├── README.md └── dark-mode.js /README.md: -------------------------------------------------------------------------------- 1 | # min-dark-mode-userscript 2 | Adds a dark theme to any page in [Min](https://minbrowser.github.io/min). 3 | 4 | To install: 5 | 6 | * Enable userscripts in Min and create a `userscripts` folder following [these instructions](https://github.com/minbrowser/min/wiki/userscripts), and save `dark-mode.js` inside it. 7 | * Restart Min. -------------------------------------------------------------------------------- /dark-mode.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Dark Mode 3 | // @match * 4 | // @run-at document-start 5 | // ==/UserScript== 6 | 7 | var style = document.createElement('style') 8 | 9 | style.textContent = ` 10 | html { 11 | background-color: #ddd; 12 | filter: hue-rotate(180deg) invert(100%) !important; 13 | } 14 | body { 15 | margin: 0; 16 | background-color: #ddd; 17 | /* twitter.com */ 18 | min-height: 100vh; 19 | } 20 | 21 | iframe, img, video, canvas { 22 | filter: hue-rotate(180deg) invert(100%) !important; 23 | } 24 | ` 25 | 26 | document.head.appendChild(style) 27 | --------------------------------------------------------------------------------