SingleFile CLI 2.22.0
New features
-
New option
--embedded-script: JavaScript code inserted at the end of the saved page. It is kept even when--block-scriptsremoves the scripts of the page, it is not inserted into the frames, and it does not run while the page is saved (use--browser-scriptfor that). Combined with--custom-stylesheetto keep hidden elements, it lets you restore a behaviour the saved page lost with its scripts, e.g. switching the tabs of a scorecard or a product page:single-file --custom-stylesheet "[role=tabpanel][hidden]{display:block}" --embedded-script "const panels = document.querySelectorAll('[role=tabpanel]'); ..." https://example.com/page
CLI fixes and improvements
- Updated single-file-core to 1.9.0
Co-authored by Claude (Claude Code)