Dark themed pages

Alters every text of all web pages to larger-text white-on-black appearance, to aid accessibility with poor eyesight such as myopia.

  1. // ==UserScript==
  2. // @name Dark themed pages
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.000005
  5. // @description Alters every text of all web pages to larger-text white-on-black appearance, to aid accessibility with poor eyesight such as myopia.
  6. // @include *
  7. // if a webpage is unsightly with this script, add it to this list of excludes. * needs to be next to only a (dot) . or (slash) / or at start or end.
  8. // @exclude *://*.nzcity.co.nz/*
  9. // @exclude *://printify.com/*
  10. // @exclude *://picsplosion.com/*
  11. // @exclude *://analytics.google.com/*
  12. // @exclude *://support.google.com/*
  13. // @author rajkumar arulambalam thankJesusforlocallight
  14. // @grant none
  15. // @run-at document-end
  16. // ==/UserScript==
  17.  
  18. (function() {
  19. 'use strict';
  20. function crawl(cube){
  21. var x2; var x3;
  22. for (x2 = 0;x2 < cube.length; x2++){
  23. if(cube[x2].nodeType == 1 ){
  24. if(cube[x2].tagName == "A"){cube[x2].style.color = "#aaaaff"; cube[x2].style.backgroundColor = "#000000";}
  25. cube[x2].style.lineHeight = 2; cube[x2].style.color = "#ffffff"; cube[x2].style.backgroundColor = "#333333";
  26. //Duplicate the line below for additional style changes, such as border colors
  27. //cube[x2].style.borderColor = "#FFFFFF";
  28. //cube[x2].style.fontSize = "16pt";// font size
  29. }
  30. if(cube[x2].hasChildNodes() ){x3 = cube[x2].childNodes; crawl(x3, x3.length);}
  31. }
  32. }
  33. function mp1 () {
  34. var x1;
  35. document.body.style.backgroundColor = "#000000";
  36. document.body.style.color = "#ffffff";
  37. x1 = document.body.childNodes;
  38. crawl(x1);
  39. }
  40. setTimeout(mp1,1000);
  41. })();