// When using in-browser PDF viewer, you can inspect it and run this in the console // It's using CSS Blending to invert the colors of the PDF function togglePDFDarkMode() { var cover = document.createElement("div"); let inversion = ` position: fixed; pointer-events: none; top: 0; left: 0; width: 100vw; height: 100vh; background-color: white; mix-blend-mode: difference; z-index: 1; ` if (document.body.contains(cover)) { document.body.removeChild(cover); } else { cover.setAttribute("style", inversion); document.body.appendChild(cover); } } togglePDFDarkMode();