Last active
June 6, 2026 05:50
-
-
Save jrwarwick/79ca363e63cebf5d2294de54bb183347 to your computer and use it in GitHub Desktop.
Bookmarklet: Universal Darkmode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){ if(window.darkModeEnabled) { document.documentElement.style.removeProperty('filter'); window.darkModeEnabled = false; }else{ document.documentElement.style.setProperty('filter','invert(90%) hue-rotate(180deg)','important'); window.darkModeEnabled = true; document.querySelectorAll('img').forEach(img => img.style.setProperty('filter','invert(90%) hue-rotate(180deg)','important')); }})(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not my work, but from: https://winstonbrown.me/blog/google-docs-dark-mode/
I have seen many, but this guy's is genius and is by far the most pleasant to the eye and easiest to read. I did add in a partial fix for the "imgs get inverted, too" problem.