Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function enforce8chanForm() {
- function simulateClick(el) {
- ['mousedown','mouseup','click'].forEach(type =>
- el.dispatchEvent(new MouseEvent(type, { bubbles: true, cancelable: true }))
- );
- el.dispatchEvent(new Event('change', { bubbles: true }));
- }
- ['qrcheckboxNoFlag','qrcheckboxScramble'].forEach(id => {
- const cb = document.getElementById(id);
- if (cb && cb.type === 'checkbox' && !cb.checked) {
- simulateClick(cb);
- }
- });
- ['qrname','qrsubject','qremail','qrpassword'].forEach(id => {
- const el = document.getElementById(id);
- if (el && el.tagName === 'INPUT') {
- el.focus();
- el.value = '';
- el.dispatchEvent(new Event('input', { bubbles: true }));
- el.dispatchEvent(new Event('change', { bubbles: true }));
- el.blur();
- }
- });
- }
- window.addEventListener('load', enforce8chanForm);
Advertisement
Add Comment
Please, Sign In to add comment