Skip to content

Instantly share code, notes, and snippets.

@Raymo111
Created January 17, 2022 03:55
Show Gist options
  • Save Raymo111/43f8d4b3d4630c3ef66016997616c90b to your computer and use it in GitHub Desktop.
Save Raymo111/43f8d4b3d4630c3ef66016997616c90b to your computer and use it in GitHub Desktop.
PDFium light mode for Dark Reader
let eee = "#eeeeee"
let sr = document.querySelector("#viewer").shadowRoot.querySelector("#toolbar").shadowRoot
sr.querySelector("#toolbar").style.backgroundColor = "lightgray"
sr.querySelector("#toolbar").style.color = "black"
let ce = sr.querySelector("#center").firstElementChild.shadowRoot
ce.querySelector("#pageselector").style.backgroundColor = eee
ce.querySelector("#pageselector").style.color = "black"
ce.querySelector("#divider").style.color = "black"
ce.querySelector("#pagelength").style.color = "black"
sr.querySelector("[aria-label='Zoom level']").style.backgroundColor = eee
sr.querySelector("[aria-label='Zoom out']").style.color = black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment