Skip to content

Instantly share code, notes, and snippets.

@xh3b4sd
Created October 24, 2022 23:56
Show Gist options
  • Save xh3b4sd/6d1807db456adb5bc664f9a3153e8ea3 to your computer and use it in GitHub Desktop.
Save xh3b4sd/6d1807db456adb5bc664f9a3153e8ea3 to your computer and use it in GitHub Desktop.
pdf dark mode hack using dev console
const overlay = document.createElement("div");
const css = `
position: fixed;
pointer-events: none;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: white;
mix-blend-mode: difference;
z-index: 1;
`
overlay.setAttribute("style", css);
document.body.appendChild(overlay);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment