- Open Firefox and press Alt to show the top menu, then click on Help → Troubleshooting Information
- Click the Open Directory button beside the Profile Directory entry
- Create a folder named chrome in the directory that opens
- In the chrome folder, create a CSS file with the name userContent.css
- Open the userContent.css file and insert -
#viewerContainer > #viewer > .page > .canvasWrapper > canvas {
filter: grayscale(100%);
filter: invert(100%);
}
- On Firefox's URL bar, type about:config.
- Search for toolkit.legacyUserProfileCustomizations.stylesheets and set it to true.
- Restart Firefox and fire up a PDF file to see the change!
Dark mode for Firefox's built-in PDF viewer