fix_input_dark_theme.user.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // ==UserScript==
  2. // @name Fix Input Dark Theme
  3. // @author Jesús E. & Enmanuel E.
  4. // @namespace fixForMyDarkTheme
  5. // @description Scan all inputs and add a inherit color option for not blind inputs in your dark theme
  6. // @homepageURL https://git.sr.ht/~heckyel/book/blob/master/scripts-greasemonkey
  7. // @include *
  8. // @grant none
  9. // @version 0.0.2
  10. // @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
  11. // ==/UserScript==
  12. /* jshint esversion: 6 */
  13. function fixForMyDarkTheme(){
  14. const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
  15. const name = GM_info.script.name;
  16. const version = GM_info.script.version;
  17. const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
  18. log('successfully initialized');
  19. let i, inputs;
  20. inputs = document.getElementsByTagName('input');
  21. for (i = 0; i < inputs.length; i++) {
  22. inputs[i].style.color='inherit';
  23. log('fixed input');
  24. }
  25. }
  26. fixForMyDarkTheme();
  27. // ohm ... m(-_-)m ... thanks