Auto Dark Mode

Automatically applies dark mode to all websites for better eye comfort at night.

  1. // ==UserScript==
  2. // @name Auto Dark Mode
  3. // @namespace https://itzmehuman000.github.io/
  4. // @version 1.0
  5. // @description Automatically applies dark mode to all websites for better eye comfort at night.
  6. // @author DUSTIN
  7. // @license MIT
  8. // @match *://*/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. const style = document.createElement('style');
  16. style.textContent = `
  17. body, html {
  18. background-color: #121212 !important;
  19. color: #ffffff !important;
  20. }
  21. * {
  22. background: transparent !important;
  23. color: inherit !important;
  24. }
  25. a {
  26. color: #4A90E2 !important;
  27. }
  28. `;
  29. document.head.appendChild(style);
  30. })();