Created
November 25, 2022 15:47
-
-
Save r4dian/463413d71d809b39d4fb00737c196d96 to your computer and use it in GitHub Desktop.
Make any website have a dark mode, by saving each of these 3 lines as a bookmarklet.
This file contains 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
// dimmer | |
javascript:var style=document.createElement('style');style.innerText='html{filter:saturate(25%) invert(80%) brightness(80%)}img{filter:invert(100%);}';var head=document.getElementsByTagName('head')[0];head.appendChild(style); | |
// less dim, but still inverted | |
javascript:var style=document.createElement('style');style.innerText='html{filter:saturate(33%) invert(90%);}img{filter:invert(100%);}';var head=document.getElementsByTagName('head')[0];head.appendChild(style); | |
// undo dimmer | |
javascript:var style=document.createElement('style');style.innerText='html{filter:saturate(100%) invert(0%) brightness(100%);}img{filter:invert(0%);}';var head=document.getElementsByTagName('head')[0];head.appendChild(style); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment