https://github.com/gildas-lormeau/SingleFile Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} gildas-lormeau / SingleFile Public * * Notifications * Fork 471 * Star 5.6k Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a single HTML file AGPL-3.0 License 5.6k stars 471 forks Star Notifications * Code * Issues 50 * Pull requests 1 * Discussions * Actions * Wiki * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 67 tags Code Latest commit @gildas-lormeau gildas-lormeau bump version ... b6719de Feb 28, 2022 bump version b6719de Git stats * 6,863 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github add liberapay (see #727) Jul 26, 2021 _locales Merge pull request #867 from xesarni/i18n-pl Feb 3, 2022 cli refactor folders structure Feb 17, 2022 companion add dev ids of SingleFile Lite Sep 27, 2021 lib bump version Feb 28, 2022 src avoid infinite loop (fix #881) Feb 27, 2022 .eslintrc.js refactor folders structure Feb 17, 2022 .gitignore revert change Oct 24, 2020 LICENSE added LICENSE Apr 25, 2019 README.MD update contributors list Dec 27, 2021 build-extension.sh refactor folders structure Feb 17, 2022 faq.md added a note about nativeMessaging permission Feb 4, 2022 manifest.json bump version Feb 28, 2022 package.json update dependencies Nov 15, 2021 privacy.md add note for GitHub Aug 27, 2021 rollup.config.dev.js refactor folders structure Feb 17, 2022 rollup.config.js refactor folders structure Feb 17, 2022 View code [ ] SingleFile Table of Contents Demo Install Getting started Additional notes FAQ Release notes Known Issues Troubleshooting unknown issues Command Line Interface Integration with user scripts SingleFileZ File format comparison Projects using SingleFile Privacy Policy Contributors Code derived from third party projects Icons License README.MD SingleFile SingleFile is a Web Extension (and a CLI tool) compatible with Chrome, Firefox (Desktop and Mobile), Microsoft Edge, Vivaldi, Brave, Waterfox, Yandex browser, and Opera. It helps you to save a complete web page into a single HTML file. Table of Contents * Demo * Install * Getting started * Additional notes * FAQ * Release notes * Known issues * Troubleshooting unknown issues * Command Line Interface * Integration with user scripts * SingleFileZ * File format comparison * Projects using SingleFile * Privacy policy * Contributors * Icons * Code derived from third party projects * License Demo [demo-sf] Install SingleFile can be installed on: * Firefox: https://addons.mozilla.org/firefox/addon/single-file * Chrome: https://chrome.google.com/extensions/detail/ mpiodijhokgodhhofbcjdecpffjipkle * Microsoft Edge: https://microsoftedge.microsoft.com/addons/detail /efnbkdcfmcmnhlkaijjjmhjjgladedno You can also download the zip file (https://github.com/gildas-lormeau /SingleFile/archive/master.zip) of the project and install it manually by unzipping it somewhere on your disk and following these instructions: * Firefox: https://extensionworkshop.com/documentation/develop/ temporary-installation-in-firefox/ * Chrome: https://developer.chrome.com/extensions/getstarted# manifest (omit the manifest creation) * Microsoft Edge: https://docs.microsoft.com/en-us/microsoft-edge/ extensions-chromium/getting-started/part1-simple-extension# run-your-extension-locally-in-your-browser-while-developing-it-side-loading Getting started * Wait until the page is fully loaded. * Click on the SingleFile button in the extension toolbar to save the page. * You can click again on the button to cancel the action when processing a page. Additional notes * Open the context menu by right-clicking the SingleFile button in the extension toolbar or on the webpage. It allows you to save: + the current tab, + the selected content, + the selected frame. * You can also process multiple tabs in one click and save: + the selected tabs, + the unpinned tabs, + all the tabs. * Select "Annotate and save the page..." in the context menu to: + highlight text, + add notes, + remove content. * The context menu also allows you to activate the auto-save of: + the current tab, + the unpinned tabs, + all the tabs. * With auto-save active, pages are automatically saved every time after being loaded (or before being unloaded if not). * Right-click on the SingleFile button and select "Manage extension" (Firefox) / "Options" (Chrome) to open the options page. * Enable the option "Destination > save to Google Drive" or "Destination > upload to GitHub" to upload pages to Google Drive or GitHub respectively. * Enable the option "Misc. > add proof of existence" to prove the existence of saved pages by linking the SHA256 of the pages into the blockchain. * You can use the customizable shortkey Ctrl+Shift+Y to save the current tab or the selected tabs. Go to about:addons and select "Manage extension shortcuts" in the cogwheel menu to change it in Firefox. Go to chrome://extensions/shortcuts to change it in Chrome. * The default save folder is the download folder configured in your browser, cf. about:addons in Firefox and chrome://settings in Chrome. * See the extension help in the options page for more detailed information about the options and technical notes. FAQ See https://github.com/gildas-lormeau/SingleFile/blob/master/faq.md Release notes See https://addons.mozilla.org/firefox/addon/single-file/versions/ Known Issues * All browsers: + For security reasons, you cannot save pages hosted on https:/ /chrome.google.com, https://addons.mozilla.org and some other Mozilla domains. When this happens, is displayed on top of the SingleFile icon. + For security reasons, SingleFile is sometimes unable to save the image representation of canvas and snapshots of video elements. + The last saved path cannot be remembered by default. To circumvent this limitation, disable the option "Misc > save pages in background". + The following characters are replaced with _ in file names: ~, +, \, ?, %, *, :, |, ", <, > * Chromium-based browsers: + You must enable the option "Allow access to file URLs" in the extension page to display the infobar when viewing a saved page, and to save or to annotate a page stored on the filesystem. + If the file name of a saved page looks like "56833935-156b-4d8c-a00f-19599c6513d3.html", disable the option "Misc > save pages in background". Reinstalling the browser may also fix this issue. You can find more info about this bug here. + Disabling the option "File name > open the "Save as" dialog to confirm the file name" will work if and only if the option "Ask where to save each file before downloading" is disabled in chrome://settings/downloads. * Firefox: + The "File name > file name conflict resolution" option does not work if set to "prompt for a name" + Sometimes, SingleFile is unable to save the contents of sandboxed iframes because of this bug. + When processing a page from the filesystem, external resources (e.g. images, stylesheets, fonts etc.) will not be embedded into the saved page. You can find more info about this bug here. This bug has been closed by Mozilla as "WontFix". But there is a simple workaround proposed here. * Waterfox Classic + User interface elements displayed in the page (progress bar, logs panel) won't be displayed unless dom.webcomponents.enabled is enabled in about:config. + When opening pages saved with the option "Images > group duplicate images together" enabled, some duplicate images might not displayed. It is recommended to disable this option. Troubleshooting unknown issues Please follow these steps if you find an unknown issue: * Save the page in incognito. * If saving page in incognito did not fix the issue, reset SingleFile options. * If resetting options did not fix the issue, restart the browser. * If restarting the browser did not fix the issue, try to disable all other extensions to see if there is a conflict. * If there is a conflict then try to determine against which extension(s). * Please report the issue with a short description on how to reproduce it here: https://github.com/gildas-lormeau/SingleFile/ issues. Command Line Interface You can save web pages to HTML from the command line interface. See here for more info: https://github.com/gildas-lormeau/SingleFile/blob /master/cli/README.MD. Integration with user scripts You can execute a user script just before (and after) SingleFile saves a page. For more info, see https://github.com/gildas-lormeau/ SingleFile/wiki/How-to-execute-a-user-script-before-a-page-is-saved. SingleFileZ SingleFileZ is a fork of SingleFile that allows you to save a webpage as a self-extracting HTML file. This HTML file is also a valid ZIP file which contains the resources (images, fonts, stylesheets and frames) of the saved page. This ZIP file can be unzipped on the filesystem in order, for example, to view the page in a browser that would not support pages saved with SingleFileZ. More info here: https://github.com/gildas-lormeau/SingleFileZ File format comparison HTML HTML MAFF MHTML Webarchive HTML+folder (SingleFile) (SingleFileZ) (Safari) Pages are saved as a single file HTML and styles are minified Unused HTML and styles are removed from files Binary resources are not encoded in base 64 Files are compressed Files can be viewed without 1 2 3 installing any extension Files can be viewed without running JavaScript Files can be unzipped to extract n/a resources and view pages Files contains the text of the page 4 (plain or formatted) which can be indexed Footnotes: 1 A switch must be passed from the command line in Chromium-based browsers, and an option must be enabled in Safari. 2 Only in Chromium-based browsers, and Internet Explorer. 3 Only in Safari. 4 An option must be enabled in the extension. Projects using SingleFile * ArchiveBox - Open-source self-hosted web archiving: https:// github.com/ArchiveBox/ArchiveBox * htmls-to-datasette - Tool to index HTML files into a Sqlite database: https://github.com/pjamar/htmls-to-datasette * singlefile2trilium - Tool to save faithful copy of a web page as a Trilium note with SingleFile: https://github.com/nil0x42/ singlefile2trilium * SingleFileMacOS - Integration of SingleFile in a swift application using webkit: https://github.com/captaindavepdx/ SingleFileMacOS * Zotero Connector - Browser extension for Zotero, a tool to help you collect, organize, cite, and share your research sources: https://github.com/zotero/zotero-connectors Privacy Policy See https://github.com/gildas-lormeau/SingleFile/blob/master/ privacy.md Contributors * Chinese translation done by yfdyh000 (https://github.com/yfdyh000 ), KrasnayaPloshchad (https://github.com/KrasnayaPloshchad), frostblazergit (https://github.com/frostblazergit), dnknn (https: //github.com/dnknn), lqzhgood (https://github.com/lqzhgood) * Traditional Chinese translation done by frostblazergit (https:// github.com/frostblazergit), lqzhgood (https://github.com/lqzhgood ) * German translation done by womotroll (https://github.com/ womotroll), bannmann (https://github.com/bannmann) * Italian translation done by Fastbyte01 (https://github.com/ Fastbyte01) * Japanese translation done by Shitennouji(Si Tian Wang Si ) (https:// github.com/Shitennouji) * Polish translation done by xesarni (https://github.com/xesarni) * Russian translation done by rstp14 (https://github.com/rstp14), kramola-RU (https://github.com/kramola-RU), solokot (https:// github.com/solokot), TotalCaesar659 (https://github.com/ TotalCaesar659) * Ukrainian translation done by perdolka (https://github.com/ perdolka) * Spanish translation done by strel (https://github.com/strel) Code derived from third party projects * csstree: https://github.com/csstree/csstree * postcss-media-query-parser: https://github.com/dryoma/ postcss-media-query-parser * postcss-selector-parser: https://github.com/postcss/ postcss-selector-parser * UglifyCSS: https://github.com/fmarcia/UglifyCSS * parse-srcset: https://github.com/albell/parse-srcset * parse-css-font: https://github.com/jedmao/parse-css-font * Readability: https://github.com/mozilla/readability * whatwg-mimetype: https://github.com/jsdom/whatwg-mimetype Icons * Icon made by Kiranshastry from Flaticon is licensed by CC 3.0 BY License SingleFile is licensed under AGPL. Code derived from third-party projects is licensed under MIT. Please contact me at gildas.lormeau gmail.com if you are interested in licensing the SingleFile code for a commercial service or product. Suggestions are welcome :) About Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a single HTML file Topics javascript chrome-extension docker cli firefox screenshot chrome osint browser firefox-addon annotations snapshot selenium archive archiver web-extension add-on puppeteer auto-save offline-reading Resources Readme License AGPL-3.0 License Stars 5.6k stars Watchers 90 watching Forks 471 forks Releases 6 v0.3.32 Latest Oct 12, 2021 + 5 releases Sponsor this project * https://www.paypal.me/glormeau * liberapay liberapay.com/gildas Contributors 26 * @gildas-lormeau * @solokot * @xesarni * @frostblazergit * @SilverCutePony * @strel * @KrasnayaPloshchad * @pirate * @perdolka * @mikaelmorvan * @jakseb + 15 contributors Languages * JavaScript 88.8% * HTML 7.8% * CSS 2.9% * Other 0.5% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.