暫無描述

Gildas be2bfc8645 updated last section 6 年之前
.github afb5f7e588 updated feature request template 7 年之前
_locales 14bd405120 added "auto-close the tab after the page is saved" option (fix #185) 6 年之前
cli af839dddfb close the browser only when retrying the capture 6 年之前
common f3d434e248 prefixed namespace with "this." 6 年之前
extension 21223bb19f removed unnecessary parameter 6 年之前
lib 1634702d04 removed dependency from core to extension 6 年之前
.eslintrc.js cf6012b438 stricter rules 7 年之前
.gitignore b6cee28b75 fixed implementation of script injection in frame contents 7 年之前
LICENSE 1253803d65 added LICENSE 6 年之前
README.MD aa053d4206 moved upper CLI section 6 年之前
build-extension.sh eb255b69d6 fixed build script 6 年之前
faq.md be2bfc8645 updated last section 6 年之前
manifest.json a180171b61 moved infobar scripts into "/common" 6 年之前
privacy.md 0c90f80597 added link to the history 6 年之前

README.MD

SingleFile

SingleFile is a Web Extension compatible with Chrome, Firefox (Desktop and Mobile), Chromium-based 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

SingleFile can be installed:

Getting started

  • Wait until the page is fully loaded, you may need to scroll down the entire page to be sure all elements are loaded.
  • Click on the SingleFile button in the extension toolbar to save the page.

Additional notes

  • To save multiple tabs, select them first and click on the SingleFile button.
  • 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,
    • or the selected content,
    • or the selected frame.
  • You can also process multiple tabs in one click and save:
    • the selected tabs,
    • or the unpinned tabs,
    • or all the tabs.
  • The context menu also allows you to activate the auto-save of:
    • the current tab,
    • or the unpinned tabs,
    • or all the tabs.
  • You can interrupt the saving progress by clicking on the SingleFile button when processing a page.
  • 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 "Options"/"Manage extension" to open the options page.
  • The default save folder is the download folder configured in your browser, cf. about:preferences in Firefox and chrome://settings in Chrome.
  • You can use the shortcut Ctrl+Shift+Y to save the current tab or the selected tabs. Go to chrome://extensions/shortcuts to change it in Chrome.
  • See the extension help in the options page for more detailed information about the options and technical notes.

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

Command Line Interface

Release notes

See https://addons.mozilla.org/firefox/addon/single-file/versions/

FAQ

See https://github.com/gildas-lormeau/SingleFile/blob/master/faq.md

File format comparison

HTML (SingleFile) HTML (SingleFileZ) MAFF MHTML Webarchive HTML+folder
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 installing any extension ✓* ✓** ✓***
Files can be viewed without running JavaScript
Files can be unzipped to extract resources
Files contains the text of the page (plain or formatted) which can be indexed ✓****
Notes
* a switch must be passed from the command line in Chrome and an option must be enabled in Safari
** only in Chromium-based browsers and Internet Explorer
*** only in Safari
**** an option must be enabled in the extension

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.
    • 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 filenames: ~, \, ?, %, *, :, |, ", <, >
  • Chrome:
    • You must enable the option "Allow access to file URLs" in the extension page to display the infobar when viewing a saved page, or to save a page stored on the filesystem.
    • If the filename of a saved page looks like "56833935-156b-4d8c-a00f-19599c6513", disable the option "Misc > Save pages in background". Reinstalling the browser may also fix this issue.
    • Disabling the option 'File name > open the "Save as" dialog to confirm the file name' will work if and only if "Ask where to save each file before downloading" is disabled in chrome://settings/downloads.
  • Firefox:
    • The "file name conflict resolution" option does not work if set to "prompt for a name"
  • Waterfox
    • When opening pages saved with the option "group duplicate images together" enabled, duplicate images are 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.

Statistics (Firefox)

See https://addons.mozilla.org/firefox/addon/single-file/statistics/?last=90

Integration with WebKit

Privacy Policy

See https://github.com/gildas-lormeau/SingleFile/blob/master/privacy.md

Contributors

Code derived from third party projects

Icons

License

SingleFile is licensed under AGPL. Code derived from third-party projects is licensed under MIT. Please contact me at gildas.lormeau <at> gmail.com if you are interested in licensing the SingleFile code for a commercial service or product.

Suggestions are welcome :)