gildas-lormeau / single-file-cli

CLI tool for saving a faithful copy of a complete web page in a single HTML file (based on SingleFile)
GNU Affero General Public License v3.0
641 stars 63 forks source link

Running single-file-cli with active "Dark Reader" extension #98

Open emp-00 opened 5 months ago

emp-00 commented 5 months ago

I want to save html in "dark mode": My html website in question works fine with the Dark Reader extension: https://darkreader.org Question: How can I ensure, that Dark Reader is active (with my user-settings) when running "single-file-cli" ? (Note if relevant: I'm using Chrome and single-file.exe @Win11)

gildas-lormeau commented 4 months ago

Sorry for the late reply, you could use your existing Chrome user profile (with the Dark Reader installed) by passing --browser-arg="--user-data-dir=..." where ... is the path to your Chrome user profile folder. An alternative would be to use --headless=new and --browser-arg= to pass the folder of the extension but I do not remember how to do it right now...