maxlength changer

changes maxlenghth to 999999

  1. // ==UserScript==
  2. // @name maxlength changer
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @license MIT
  6. // @description changes maxlenghth to 999999
  7. // @author joshclark756
  8. // @include http://*/*
  9. // @include https://*/*
  10. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. setInterval(() => {
  15. document.querySelectorAll('[maxlength]').forEach(element => {
  16. const originalValue = '999999';
  17. const currentValue = element.getAttribute('maxlength');
  18.  
  19. // Check if the current value is different from the original value
  20. if (currentValue !== originalValue) {
  21. // If different, set it back to the original value
  22. element.setAttribute('maxlength', originalValue);
  23. console.log(`Changed maxlength for element: ${element.tagName}`);
  24. }
  25. });
  26. }, 10);