I have enabled the dark mode in Firefox version 76.0 as well as installed the dark reader extension. The extension allows web pages to go dark. These changes do not affect any PDFs that have been opened in Firefox.
I have enabled the dark mode in Firefox version 76.0 as well as installed the dark reader extension. The extension allows web pages to go dark. These changes do not affect any PDFs that have been opened in Firefox.
Recording this for anyone who has this problem
Create a bookmarklet - a bookmark with the following in the location/address field
javascript:(function(){viewer.style = 'filter: grayscale(1) invert(1) sepia(1) contrast(75%)';})()
Hope this helps.
You can see it in https://pncnmnp.github.io/blogs/firefox-dark-mode.html
Alt to show the top menu, then click on Help → Troubleshooting InformationOpen Folder button beside the Profile Folder entrychrome in the directory that openschrome folder, create a CSS file with the name userContent.cssuserContent.css file and insert -#viewerContainer > #viewer > .page > .canvasWrapper > canvas {
filter: grayscale(100%);
filter: invert(100%);
}
about:config.toolkit.legacyUserProfileCustomizations.stylesheets and set it to true.Simple bookmarklet toggler
Just run snippet and drag link to Bookmarks Toolbar
<a href="javascript:(function(v) {v.style = v.classList.contains('dm')?'':'filter: grayscale(1) invert(1) sepia(1) contrast(75%)';v.classList.toggle('dm');})(viewer)">PDF darkmode toggler</a>
Unminified:
(
function() {
if (viewer.classList.contains("dm")) viewer.style = "";
else viewer.style = "filter: grayscale(1) invert(1) sepia(1) contrast(75%)'";
viewer.classList.toggle("dm");
}
)()