Guest User

8ch checkbox and input field preference thing

a guest
Apr 18th, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function enforce8chanForm() {
  2.     ['qrcheckboxNoFlag','qrcheckboxScramble'].forEach(id => {
  3.         const cb = document.getElementById(id);
  4.         if (cb && cb.type === 'checkbox') cb.checked = true;
  5.     });
  6.  
  7.     const fields = ['qrname','qrsubject','qremail','qrpassword']
  8.         .map(id => document.getElementById(id))
  9.         .filter(el => el && el.tagName === 'INPUT');
  10.  
  11.     fields.forEach(f => {
  12.         f.value = '';
  13.         f.disabled = true;
  14.         f.setAttribute('autocomplete', 'off');
  15.     });
  16.  
  17.     setTimeout(() => {
  18.         fields.forEach(f => {
  19.             f.disabled = false;
  20.             f.value = '';
  21.         });
  22.     }, 1000);
  23. }
  24. window.addEventListener('load', enforce8chanForm);
Advertisement
Add Comment
Please, Sign In to add comment