Created
October 23, 2021 07:38
-
-
Save r3gor/e03095603c0d21fe3c4431b46fdc3663 to your computer and use it in GitHub Desktop.
dark mode pdf
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
/* | |
Dark mode | |
Execute the following code in your browser console. | |
https://superuser.com/questions/1527410/how-can-i-preview-pdfs-with-google-chrome-in-dark-mode/1527417 | |
*/ | |
var cover = document.createElement("div"); | |
let css = ` | |
position: fixed; | |
pointer-events: none; | |
top: 0; | |
left: 0; | |
width: 100vw; | |
height: 100vh; | |
background-color: white; | |
mix-blend-mode: difference; | |
z-index: 1; | |
` | |
cover.setAttribute("style", css); | |
document.body.appendChild(cover); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment