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);
althafMuhammedUmer/Chrome-Pdf-dark-mode
To change the white background of a pdf to a dark one, paste the code below into your console