All Answers
Best Of Guides

Dark Mode Extension That Works on Local Files

Patrick Bushe · May 1, 2026

Chrome blocks extensions from local files until you allow it, which is why most dark themes seem to skip them.

For Modern Dark Mode, go to chrome://extensions, click Details under Modern Dark Mode and turn on "Allow access to file URLs". After that, local HTML, text and JSON files you open in Chrome are darkened like any web page. PDFs are the exception: they open in Chrome's built-in PDF viewer, where extensions can't run. The extension doesn't read or send anything from your files; it only adds a style to the page.

More guides on similar topics