Last active
May 13, 2021 21:47
-
-
Save Odepax/d599626fac4941a85aebfa37b137a337 to your computer and use it in GitHub Desktop.
Quick & dirty dark theme
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
((invertImages, invertCode, applyBlackBackground) => { | |
document.body.style.filter = "invert()" | |
document.body.style.background = applyBlackBackground ? "black" : "white" | |
Array.from(document.querySelectorAll("pre")).map(pre => pre.style.filter = invertCode ? "invert()" : null) | |
Array.from(document.querySelectorAll("img")).map(img => img.style.filter = invertImages ? "invert()" : null) | |
})(/* Invert Image | Invert Code | Dark BG */ 1, 0, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment