You can customize SingleFile through the options page. Right-click on SingleFile button in the browser toolbar and select "Options"/"Manage
extension" in the context menu to open the options page.
Profiles
A profile is a set of user-defined options associated to a unique name.
The drop-down list in the upper right of the options page allows you to select a profile and modify the associated options. The buttons next to the drop-down list allows you respectively to create, delete and rename a profile.
You can select the default profile through the context menu of SingleFile. The selection is persistent and applied to all tabs.
You can also override the default profile by associating a profile to a complete or partial URL. See the description of the Auto-settings rules feature for more info.
User interface
Check this option to display an entry for SingleFile in the context menu of the webpage. The
context menu of the SingleFile button in
the extension toolbar is displayed whether this option is checked or not.
It is recommended to check this option
Check this option to overlay a shadow on the page when SingleFile is retrieving page resources. This reminds you that you should not close the tab.
It is recommended to check this option
Check this option to display the saved page in a new tab. This option can be useful, for example, in order to check the page is properly saved.
Check this option to automatically close the tab after saving the page displayed inside.
File name
The template allows you to customize the file name of saved pages. You can use any valid character and "/" to create sub-folders (with the option "save pages in background" active). You can also use any variables from this list and functions from this list anywhere in the template.
Invalid characters are automatically transformed and collapsed to underscores. File names
cannot exceed 192 characters and are truncated if longer. The invalid characters are:
[
~
+
\
?
%
*
:
|
"
<
>
and control characters from 0 to 31 in the ASCII table. When you want
to customize the infobar, you can prefix the special characters %
,
<
, >
, {
, }
and |
with
\
(e.g. \>
) to keep them in the infobar content.
Template examples:
{page-title} ({date-iso} {time-locale}).html
will produce filenames like
"Introduction to SingleFile (2018-09-15 11_06_03 PM).html" for a page having
"Introduction to SingleFile" as title.archives/{url-last-segment} - {date-iso}
will produce filenames like
"welcome - 2018-09-15" for a page hosted on https://example.com/welcome.html. The saved
files will be saved in the sub-directory "archives".archives/{year-locale}/{month-locale}/{day-locale}/{page-title}.html
will
produce filenames like "Introduction to SingleFile.html" stored into 3 sub-directories
in the "archives" folder, one for each part of the save date (e.g.
"2018/9/15/Introduction to SingleFile.html").Enter the maximum length of the filename (without the extension) and its unit (bytes or characters).
Enter the character used to replace invalid characters in the filename.
Check this option to replace emojis in the file name with their unicode text representation.
Check this option to save the template file data to the page. This allows you to recover template data previously used when saving the page and, for example, to ensure that the file is saved in the same directory as the original file when saving the page again.
Check this option to display the "Save as" dialog in order to confirm the file name before saving the page. If the option "save pages in background" is unchecked then a prompt dialog will be displayed instead of the "Save as" dialog.
Choose the most appropriate action when the filename of the saved page is conflicting with existing ones on the filesystem. The "skip duplicate files" action only detects duplicates among files downloaded during the current browsing session.
File format
Select the output format of the saved file:
"HTML"
: HTML file (default format). This format produces HTML files that do
not depend on JavaScript to be opened.
"self-extracting ZIP (universal)"
: self-extracting ZIP file that can be
opened on any platform. This format produces files smaller than the "HTML" format but
requires JavaScript to be enabled to open the file.
"self-extracting ZIP"
: self-extracting ZIP file that can be
opened on any platform from HTTP but not from the filesystem in some browsers (e.g.
in browsers based on Chromium or WebKit) without SingleFile to be installed. This format
produces files smaller (approx. 1%) than the "self-extracting ZIP (universal)" format.
"ZIP"
: ZIP file. This format produces ZIP files that cannot be opened in a
browser but can be opened in the annotation editor.
Type a password to encrypt the ZIP file with AES-256 (compatible with Winzip). Be careful, if you lose the password, it will be impossible to open the file. Enabling this option increases the CPU consumption and the time needed to save or read a page.
Check one of the options to embed an image when saving the page as a ZIP file (self-extracting or not). This allows you to display the saved page as a PNG image when the filename extension is changed to ".png".
Check this option to create a root directory in the ZIP file. The directory name consists of a timestamp and the identifier of the tab where the saved page is displayed.
Check this option to remove the data appended after the ZIP data. The resulting file may be easier to open with some archive managers that do not support ZIP files with appended data. Enabling this option increases the time needed to save a page.
Check this option to insert the text content of the saved page into the self-extracting ZIP file. This makes it possible, for example, to search for pages from the text. Note that if the selected format is "self-extracting ZIP (universal)", the text content is encoded in UTF-8 but the page is declared in ISO-8859-1.
HTML content
Check this option to remove all HTML comments and unneeded tags, spaces, quotes and whitespace characters. Checking this option helps to reduce the size of the file without altering the document.
It is recommended to check this option
Check this option to remove all hidden elements. Checking this option can help to reduce the size of the file without altering the document. It may also increase the CPU consumption and the time needed to save a page.
It is recommended to check this option
Check this option to add a meta tag with a policy to block any external resources from being loaded.
It is recommended to check this option
Check this option to remove all frame and iframe elements. Checking this option can considerably reduce the size of the file without altering the document most of the time. It may also decrease the time needed to save a page.
Check this option to save the URLs of the resources embedded into the saved page. URLs are stored in attributes with a name prefixed with "data-sf-original-" and suffixed with the original attribute name (e.g. "data-sf-original-src", "data-sf-original-href") for HTML contents. For CSS contents, URLs are stored as comments beginning with "original URL:".
Check this option to remove the saved date included in the saved page and displayed in the infobar.
Check this option to save the raw HTML file that the browser received. When this option is checked, the page will be saved as if JavaScript was disabled. Checking this option may alter the document.
It is recommended to uncheck this option
Infobar
Check this option to display the ℹ button at the top right of the page when viewing a saved page. By clicking this button, you can get more information about the saved date and open the original URL.
It is recommended to check this option
The template allows you to customize the content displayed in the infobar. You can use any
valid character, \n
for new lines or \t
for tabs. You can also use
any variables from this list anywhere in the template. If
the template or the resulting content is empty, the infobar will display the saved date by
default.
Template examples:
{url-href} ({date-iso})
will produce contents like "https://www.example.com
(2018-09-15 11 06 03 PM)".Title: {page-title}
will produce contents like "Title: Example Domain" for
a page having "Example Domain" as title.Check this option to display a prompt dialog in order to confirm the infobar content before saving the page.
Check this option to display the ℹ button at the top right of the page when viewing a saved page in a browser where SingleFile is not installed.
Check this option to keep the infobar open when viewing a saved page.
Stylesheets
Check this option to remove all the CSS rules and styles that do not match any element in the saved page. Checking this option will not alter the document and can considerably reduce the size of the file. It will also increase the CPU consumption and the time needed to save a page.
It is recommended to check this option
Check this option to remove stylesheets that are not used for the screen display like stylesheets for print preview and speech synthesizers. Checking this option can help to reduce the size of the file.
Check this option to minify CSS stylesheets. Checking this option can reduce size of the file without altering the document. It may also increase the CPU consumption and the time needed to save a page.
It is recommended to uncheck this option
Check this option to group together all the duplicate inline stylesheets. Checking this option should not alter the document and can considerably reduce the size of the file. This option is ignored with archive formats based on ZIP files. Please note that this option requires JavaScript to be enabled in order to function properly.
It is recommended to uncheck this option
Check this option to move all the style elements found outside the head element into the head element. This can be useful to avoid a FOUC ("flash of unstyled content") when displaying a saved page.
It is recommended to uncheck this option
Images
Check this option to avoid saving multiple times duplicate images. Checking this option should not alter the document in modern browsers and can considerably reduce the size of the file. This option is ignored with archive formats based on ZIP files.
It is recommended to check this option
Check this option to save all the deferred images (or frames) that are not yet displayed. This may help to save all the images without scrolling the page. This feature does its best effort and is not guaranteed to work on all sites. It will also increase the time needed to save a page.
It is recommended to check this option
Enter the maximum delay of time to wait for deferred images. You can increase this value if for example the network or system conditions are degraded. You can also decrease this value otherwise.
Check this option to dispatch the "scroll" event when waiting for deferred images. This can improve the loading of images on some sites but it can also cause unexpected scrolling problems on some other sites.
It is recommended to uncheck this option
Check this option to save the entire content of a page by zooming out the page. This can help saving pages using infinite virtual lists for example.
It is recommended to uncheck this option
Check this option to load deferred frames and images before saving frame contents. It will increase the time needed to save a page.
It is recommended to uncheck this option
Check this option to remove images that are alternatives in lower and/or higher resolutions to the ones displayed by default. Checking this option can considerably reduce the size of the file.
Fonts
Check this option to remove all font CSS rules that do not match any content. Checking this option should not alter the document and can considerably reduce the size of the file.
It is recommended to check this option
Check this option to remove fonts that are alternatives to the ones used. Checking this option should not alter the document and can considerably reduce the size of the file.
It is recommended to check this option
Destination
Check this option to save the downloaded page on the filesystem of your computer.
It is recommended to check this option
Check this option to copy the page to the clipboard. This option does not work with archive formats based on ZIP files.
It is recommended to uncheck this option
Check this option to save the page on GitHub. See the documentation page to learn how to configure SingleFile to save pages on GitHub. Warning: once a page saved on GitHub, it is complicated to delete it, see the documentation page on GitHub for more information.
It is recommended to uncheck this option
Enter your personal access token on GitHub, see the documentation page on GitHub for more information.
Enter your user name on GitHub.
Enter the name of the repository on GitHub where the saved pages will be archived, see the documentation page on GitHub for more information on how to create a repository.
Enter the repository branch name where pages will be archived. The branch must exist on GitHub, see the documentation page on GitHub for more information on how to publish the branch on github.io.
Check this option to save the page on a WebDAV server.
It is recommended to uncheck this option
Enter the URL of the WebDAV server.
Enter your user identifier on the WebDAV server.
Enter your password.
Check this option to save the page on Google Drive.
The permissions requested by SingleFile allow it to access only to the files and folders it has created. When you uncheck this option, SingleFile revokes automatically its access to your Google Drive account.
It is recommended to uncheck this option
Check this option to save the page on Amazon S3. You must configure the bucket policy to
include the permission s3:PutObject
, and s3:HeadObject
or
s3:ListObjects
, or s3:GetObject
if you do not want to overwrite or
skip existing files in the event of a filename conflict.
It is recommended to uncheck this option
Enter the domain of the Amazon S3 server (e.g. s3.amazonaws.com
).
Enter the region of the Amazon S3 server (e.g. us-east-1
).
Enter the name of the bucket on Amazon S3 where the saved pages will be archived. Pages will
be uploaded to <bucket name>.<domain>
Enter your access key on Amazon S3 (e.g. AKDO525K84LJTH4SFAKE
).
Enter your secret key on Amazon S3.
Check this option to save the page on Dropbox.
The permissions requested by SingleFile allow it to access only to the files and folders it has created.
It is recommended to uncheck this option
Check this option to delegate the saving process to SingleFile Companion. It is a program that runs outside the browser and can help to make the saving process more transparent. It also allows the pages to be saved in another directory than the download directory. You can find more info here
It is recommended to uncheck this option
Check this option to save the page on an API endpoint accepting form data.
It is recommended to uncheck this option
Enter the URL of the API endpoint.
Provide the the value of the "Bearer" token to authenticate the request.
Enter the name of the field that will contain the data of the saved page.
Enter the name of the field that will contain the URL of the saved page.
Network
Check the options below to block the download of the corresponding resource types.
Check this option to block active content served from HTTP when viewing a page in HTTPS. You can find more information about mixed content pages here.
Enter the "Accept" HTTP header values below to adjust support for the corresponding resource types.
It is recommended to leave these values as they are
Check this option to remove from the saved page embedded resources (i.e. images, stylesheets, scripts and iframes) that exceeds a given size.
Enter the maximum size in megabytes.
Check this option to remove from the saved page embedded resources (i.e. images, stylesheets, scripts and iframes) that exceeds a given download time.
Enter the maximum download delay in seconds.
Check this option to pass the HTTP header "Referer" with the "origin" policy after an 401, 403, or 404 HTTP error when downloading a cross-origin resource. You should enable this option if you cannot download resources blocked by a hotlink protection.
It is recommended to uncheck this option
Annotation editor
Select the default mode when opening the annotation editor. The available choices are:
normal
: default valueedit the page
: enable the button format the page
: enable the button remove elements
: enable the button remove external elements
: enable the button Uncheck this option if you do not want to apply the theme of the operating system or the browser (e.g. dark or light) when you click on the button "Format the page for better readability" in the annotation editor.
Check this option to display a blocking popup when you leave the annotation editor (e.g. close the tab) without saving the changes.
It is recommended to check this option
Check this option to open the annotation editor before saving any page. Checking this option removes the entry "Annotate and save the page..." from the context menu.
It is recommended to uncheck this option
Check this option to open the annotation editor when displaying a page saved by SingleFile.
It is recommended to uncheck this option
Check this option to display the infobar when displaying a page in the annotation editor.
It is recommended to uncheck this option
Bookmarks
Check this option to save pages that you add into your bookmarks. Note that if the page is to be saved is not already displayed in a tab, SingleFile will open temporarily a new tab to save the page.
It is recommended to uncheck this option
Check this option to replace the URL of the page added into your bookmark with the file URI of the saved page on your disk.
It is recommended to uncheck this option
Enter a list of bookmark folder names to ignore. The folder names must be separated with a comma. SingleFile will ignore bookmarks added in folders that contains these names.
Enter a list of bookmark folder names to allow. The folder names must be separated with a comma. SingleFile will only save pages added in folders that contains these names.
Auto-save
Check this option to auto-save pages after being loaded. If you browse to another page before the page is fully loaded then the page will be saved just before being unloaded. With this option active, you are guaranteed pages will always be saved. Some frame contents may be missing (if you checked "remove frames") when pages are saved before being unloaded.
Check this option to auto-save pages after being loaded.
Check this option to auto-save pages before being unloaded instead of saving pages after being loaded. With this option active, you are guaranteed pages will always be saved but some frame contents may be missing (if you checked "remove frames").
Check this option to auto-save pages when discarding a tab. Some frame contents may be missing (if you checked "remove frames").
Check this option to auto-save pages when closing a tab. Some frame contents may be missing (if you checked "remove frames").
Enter the delay in seconds to wait before saving a page when the "auto-save on page load or on page unload" or "auto-save on page load" is checked.
Check this option to auto-save pages periodically after load.
Enter the delay in seconds to wait before each page saving when the "auto-save periodically" option is checked.
Check this option to delegate the capturing and saving process to SingleFile Companion. It is a program that runs outside the browser and can help to make the saving process more transparent. It also allows the pages to be saved in another directory than the download directory. You can find more info here
Misc.
Check this option to create a worldwide proof of the existence of the page you want to save.
More information doc.woleet.io
Enter your personal access token on Woleet, see the registration page on Woleet for more information.
Uncheck this option if you get invalid file names like "37bec68b-446a-46a5-8642-19a89c231b46.html" or interrupted downloads when saving pages. You can also uncheck this option if you want the "Save as" dialog to remember the last saved path. Unchecking this option prevent using sub-directories in filename templates.
It is recommended to check this option
Check this option to display stats about processing in the JavaScript developer tools of your browser. Checking this option may increase the CPU consumption and the time needed to save a page.
It is recommended to uncheck this option
Auto-settings rules
Form buttons
Check this option to synchronize your options and make them available in all instances of the browser you are logged into, on different devices.
Reset all options to their default values.
The annotation editor can be opened by selecting "Annotate and save the page" in the context menu or by enabling the option "Annotation editor > edit page before saving". It allows you to:
Ctrl-P
Ctrl-S
You can use the following keyboard shortcuts when removing contents with or
:
Tab
: expand the selectionShift-Tab
: reduce the selectionSpace
: remove the selected elementCtrl-Z
: undo the last removalCtrl-Shift-Z
: redo the last removalCtrl
: select/unselect multiple elements, releasing the Ctrl
key
validates the selectionShift
: temporarily reverse the type of removal (i.e. removal of inner elements or
removal of outer elements) on the last selected element and reset the other selected elements if
anyEscape
: reset selected elementsThe template variables are used to customize the infobar content or the file name of a saved page. They help to insert dynamic values like the save date or the page title.
You can limit the length of a dynamic value by adding [maxByteSize]
or
[maxCharSizech]
just after the variable name. The maxByteSize
value is the maximum length of the value in bytes (e.g. `{page-title}[20]` to limit the title to 20
bytes). The maxCharSize
value is the maximum length in characters (e.g.
`{page-title}[10ch]` to limit the title to 10 characters).
{navigator-language}
: the language of the browser{page-title}
: the title of the page{page-heading}
: the content of the H1 tag in the page{page-language}
: the language of the page{page-description}
: the description of the page{page-author}
: the author of the page{page-creator}
: the creator of the page{page-publisher}
: the publisher of the page{datetime-iso}
: the save date and time in the ISO format (e.g.
"2018-09-15T22_38_26_317Z"){datetime-utc}
: the save date and time in UTC format (e.g. "Sat, 15 Sep 2018
22_38_26 GMT"){datetime-locale}
: the localized value of the date and time (e.g. "9_16_2018,
12_54_31 AM"){date-iso}
: the save date in the ISO format (e.g. "2018-09-15"){date-locale}
: the localized value of the save date (e.g. "16_09_2018"){time-iso}
: the save time in the ISO format (e.g. "22_38_26_317"){time-locale}
: the localized value of the save time (e.g. "00_38_26"){time-ms}
: the save time is ms since the Unix Epoch (e.g. 1563582018000){day-utc}
: the day of the save date in UTC format (e.g. "15"){day-locale}
: the localized value of the day (e.g. "15"){month-utc}
: the month of the save date in UTC format (e.g. "09"){month-locale}
: the localized value of the month (e.g. "09"){year-utc}
: the year of the save date in UTC format (e.g. "2018"){year-locale}
: the localized value of the year (e.g. "2018"){hours-utc}
: the hour of the save date in UTC format (e.g. "20"){hours-locale}
: the localized value of the hour (e.g. "22"){minutes-utc}
: the minutes of the save date in UTC format (e.g. "38"){minutes-locale}
: the localized value of the minutes (e.g. "38"){seconds-utc}
: the seconds of the save date in UTC format (e.g. "31"){seconds-locale}
: the localized value of the seconds (e.g. "31"){visit-datetime-iso}
: the visit date and time in the ISO format (e.g.
"2018-09-15T22_38_26_317Z"){visit-datetime-utc}
: the visit date and time in UTC format (e.g. "Sat, 15 Sep 2018
22_38_26 GMT"){visit-datetime-locale}
: the localized value of the date and time (e.g. "9_16_2018,
12_54_31 AM"){visit-date-iso}
: the visit date in the ISO format (e.g. "2018-09-15"){visit-date-locale}
: the localized value of the visit date (e.g. "16_09_2018"){visit-time-iso}
: the visit time in the ISO format (e.g. "22_38_26_317"){visit-time-locale}
: the localized value of the visit time (e.g. "00_38_26"){visit-time-ms}
: the visit time is ms since the Unix Epoch (e.g. 1563582018000)
{visit-day-utc}
: the day of the visit date in UTC format (e.g. "15"){visit-day-locale}
: the localized value of the day (e.g. "15"){visit-month-utc}
: the month of the visit date in UTC format (e.g. "09"){visit-month-locale}
: the localized value of the month (e.g. "09"){visit-year-utc}
: the year of the visit date in UTC format (e.g. "2018"){visit-year-locale}
: the localized value of the year (e.g. "2018"){visit-hours-utc}
: the hour of the visit date in UTC format (e.g. "20"){visit-hours-locale}
: the localized value of the hour (e.g. "22"){visit-minutes-utc}
: the minutes of the visit date in UTC format (e.g. "38"){visit-minutes-locale}
: the localized value of the minutes (e.g. "38"){visit-seconds-utc}
: the seconds of the visit date in UTC format (e.g. "31"){visit-seconds-locale}
: the localized value of the seconds (e.g. "31"){url-href}
: the URL of the page (e.g. "http://example.com/category/index.html")
{url-href-digest-sha-1}
: the SHA-1 hash value of the URL of the page (e.g.
4b826844d9f5c128533e4ff14d746334f3ac9e00){url-href-flat}
: the URL of the page with replaced slashes (e.g.
"http__example.com_category_index.html"){url-pathname}
: the path name of the URL (e.g. "category/index.html"){url-pathname-flat}
: the path name of the URL with replaced slashes (e.g.
"category_index.html"){url-last-segment}
: the last part of the pathname (without the extension) or the
host if not found (e.g. "index"){url-protocol}
: the protocol of the URL (e.g. "https"){url-host}
: the host name + the port of the URL (e.g. "example.com_8080"){url-hostname}
: the host name of the URL (e.g. "example.com"){url-hostname-suffix}
: the suffix of the host name of the URL (e.g. "com"){url-hostname-domain}
: the domain of the host name of the URL (e.g. "example"){url-hostname-root}
: the root of the host name of the URL (e.g. "example.com"){url-hostname-subdomains}
: the sub-domains of the host name of the URL (e.g.
"sub" for "sub.example.com"), "www" is ignored{url-port}
: the port of the URL (e.g. "8080"){url-username}
: the user name of the URL (e.g. "john_doe"){url-password}
: the password of the URL (e.g. "qwerty123"){url-search}
: the search string of the URL (e.g. "order=ascending"){url-hash}
: the hash of the URL (e.g. "chapter-2"){url-referrer}
: the URI of the page that "linked" to the page (e.g.
"http://example.com"){url-referrer-flat}
: the URI of the page that "linked" to the page with slashed
replaced (e.g. "http_example.com"){bookmark-pathname}
: the path name of the newly created bookmark (e.g. "My
Bookmarks/Last Month") when the option "Bookmarks > save the page of a
newly created bookmark" is enabled{bookmark-pathname-flat}
: the path name of the newly created bookmark with replaced
slashes (e.g. "My Bookmarks_Last Month") when the option "Bookmarks > save the page of a
newly created bookmark" is enabled{tab-id}
: the unique identifier of the tab (e.g. "326"){tab-index}
: the index of the tab in the window (e.g. "1"){digest-sha-256}
: the SHA-256 hash value of the entire page content (e.g.
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855){digest-sha-384}
: the SHA-384 hash value of the entire page content{digest-sha-512}
: the SHA-512 hash value of the entire page content{profile-name}
: the name of the profile used to save the page{filename-extension}
: the extension of the filename depending on the file format
(i.e. "html", "u.zip.html", "zip.html", "zip"){save-action}
: the action used to save the page (i.e. "page", "selection"){options-json}
: the JSON representation of the options used to save the page. Each
property name is written in camel case (e.g. "blockScripts"){options-text}
: the text representation of the options used to save the page. The
text representation is formatted with a list of options and their values separated by a line
break (e.g. "saveRawPage: false\includeInfobar: true...")The template functions are used to format values in the template or to insert values depending on parameters.
The syntax of a function call is %function-name<parameter>
.
You can pass multiple parameters separated with a pipe character (e.g.
"%function-name<parameter1|parameter2>"). Like the template
variables, you can limit the length of a dynamic value by adding [maxByteSize]
or [maxCharSizech]
just after the function name.
%if-empty<value|default>
: returns the default
value if
value
is empty (e.g. "%if-empty<{page-title}|Untitled>" to return "Untitled"
if the page title is empty).
You also can pass multiple values separated with a pipe character (e.g.
"%if-empty<{page-title}|{page-heading}|Untitled>" to return the page heading if not empty,
the page title if not empty or "Untitled" if both are empty).
%if-not-empty<value|default>
: returns the default
value if
value
is not empty (e.g. "%if-not-empty<{page-title}({page-title})> to return
the page title surrounded by parentheses if the page title is not empty).
You also can pass multiple values separated like with the function %if-empty
.
%if-equals<value|expected|trueValue|falseValue>
: returns the
trueValue
if value
equals expected
or the
falseValue
otherwise (e.g.
"%if-equals<{page-title}|Untitled|{page-heading}|{page-title}>"
to return the page heading if the page title equals "Untitled" or the page title otherwise).
%if-not-equals<value|expected|trueValue|falseValue>
: returns the
trueValue
if value
does not equal expected
or the
falseValue
otherwise (e.g.
"%if-not-equals<{page-title}|Untitled|{page-title}|{page-heading}>"
to return the page title if the page title does not equal "Untitled" or the page heading
otherwise).
%if-contains<value|expected|trueValue|falseValue>
: returns the
trueValue
if value
contains expected
or the
falseValue
otherwise (e.g.
"%if-contains<{page-title}|Untitled|{page-heading}|{page-title}>"
to return the page heading if the page title contains "Untitled" or the page title otherwise).
%if-not-contains<value|expected|trueValue|falseValue>
: returns the
trueValue
if value
does not contain expected
or the
falseValue
otherwise (e.g.
"%if-not-contains<{page-title}|Untitled|{page-title}|{page-heading}>"
to return the page title if the page title does not contain "Untitled" or the page heading
otherwise).
%substring<value|start|end>
: returns a substring of the value
(e.g. "%substring<{page-title}|0|20>" to return the first 20 characters of the page
title, "%substring<{page-title}|5>" to return the page title without the first 5
characters).
%lowercase<value>
: returns the value
in lowercase (e.g.
"%lowercase<{page-title}>" to return the page title in lowercase).
%uppercase<value>
: returns the value
in uppercase (e.g.
"%uppercase<{page-title}>" to return the page title in uppercase).
%capitalize<value>
: returns the value
with the first letter in
uppercase (e.g. "%capitalize<{page-title}>" to return the page title with the first letter
in uppercase).
%replace<value|search|replacement>
: returns the value
with
all search
values replaced by replacement
(e.g.
"%replace<{page-title}| |_>" to replace all spaces by underscores in the page title).
%repeat<value|count>
: returns the value
repeated
count
times (e.g. "%repeat<{page-title}|3>" to repeat the page title 3
times).
%index-of<value|search|fromIndex>
: returns the index of the first occurrence
of search
in value
(e.g. "%index-of<{page-title}|"Title">" to
return the index of the first occurrence of the string "Title" in page-title
).
%last-index-of<value|search|fromIndex>
: returns the index of the last
occurrence of search
in value
(e.g.
"%last-index-of<{page-title}|"Title">" to return the index of the last occurrence of the
string "Title" in page-title
).
%length<value>
: returns the length of the value
(e.g.
"%length<{page-title}>" to return the length of the page title).
%trim<value>
: returns the value
with all leading and trailing
whitespace removed (e.g. "%trim<{page-title}>" to remove all leading and trailing
whitespace in the page title).
%trim-left<value>
: returns the value
with all leading
whitespace removed (e.g. "%trim-left<{page-title}>" to remove all leading whitespace in
the page title).
%trim-right<value>
: returns the value
with all trailing
whitespace removed (e.g. "%trim-right<{page-title}>" to remove all trailing whitespace in
the page title).
%pad-left<value|length|pad>
: returns the value
with
pad
added to the left side so as to make the length of the value
equal
to length
(e.g. "%pad-left<{page-title}|20|_>" to add underscores to the left
side of the page title so as to make its length equal to 20).
%pad-right<value|length|pad>
: returns the value
with
pad
added to the right side so as to make the length of the value
equal to length
(e.g. "%pad-right<{page-title}|20|_>" to add underscores to
the right side of the page title so as to make its length equal to 20).
%url-search-name<index>
: the name of the search parameter at the specified
index (e.g. "%url-search-name<0>" for the name of the first search parameter)
%url-search-value<index>
: the value of the search parameter at the specified
index (e.g. "%url-search-value<0>" for the value of the first search parameter)
%url-search-named-value<name>
: the value of the search parameter with the
specified name (e.g. "%url-search-named-value<id>" for the value of the search parameter
"id")
%url-segment<index>
: the segment of the pathname at the specified index (e.g.
"%url-segment<0>" for the first segment of the pathname)
%url-hostname-subdomain<index>
: the subdomain of the hostname at the
specified index (e.g. "%url-hostname-subdomain<0>" for the first subdomain of the
hostname)
%stringify<value>
: the string representation of the specified value (e.g.
"%stringify<{page-title}>" for the string representation of the page title)
%encode-uri<value>
: the URI-encoded representation of the specified value
(e.g. "%encode-uri<{page-title}>" for the URI-encoded representation of the page title)
%decode-uri<value>
: the URI-decoded representation of the specified value
(e.g. "%decode-uri<{page-title}>" for the URI-decoded representation of the page title)
%encode-uri-component<value>
: the URI-encoded representation of the
specified value (e.g. "%encode-uri-component<{page-title}>" for the URI-encoded
representation of the page title)
%decode-uri-component<value>
: the URI-decoded representation of the
specified value (e.g. "%decode-uri-component<{page-title}>" for the URI-decoded
representation of the page title)
%page-element-text<selector>
: the text content of the first element matching
the specified selector (e.g. "%page-element-text<h1>" for the text content of the first H1
element)
%page-element-attribute<selector|attribute>
: the value of the specified
attribute of the first element matching the specified selector (e.g.
"%page-element-attribute<h1|class>" for the class attribute of the first H1 element)
%date-locale<locales>
: the localized value of the date and time (e.g.
"%date-locale<en-US>" for the date and time in the US English format)
%time-locale<locales>
: the localized value of the time (e.g.
"%time-locale<en-US>" for the time in the US English format)
%datetime-locale<locales>
: the localized value of the date and time (e.g.
"%datetime-locale<en-US>" for the date and time in the US English format)
%datetime-custom<locale|year|month|day|weekday|hour|minute|second|hour12|time-zone|fractional-seconds-digits|time-zone-name|era|locale-matcher>
:
the date and time formatted according to the specified locale and options. See below for the
list of options. You can pass
(space character) as a value to use the default
value for an option. You can also omit options at the end of the list. For example, to format
the date and time in the US English format with the year, day, and weekday, you can use
"%datetime-custom<en-US|numeric| |numeric| |numeric>".
locale
: the locale to use as a BCP 47 language tag (e.g. "en-US")year
: the year format (i.e. "numeric", "2-digit")month
: the month format (i.e. "numeric", "2-digit", "narrow", "short",
"long")
day
: the day format (i.e. "numeric", "2-digit")weekday
: the weekday format (i.e. "narrow", "short", "long")hour
: the hour format (i.e. "numeric", "2-digit")minute
: the minute format (i.e. "numeric", "2-digit")second
: the second format (i.e. "numeric", "2-digit")hour12
: whether to use 12-hour time (i.e. "true", "false")time-zone
: the time zone of the IANA Time Zone Database (e.g. "UTC", "GMT",
"EST", "PST", "America/New_York")fractional-seconds-digits
: the number of fractional second digits (i.e.
"1" to "3")time-zone-name
: the time zone name format (i.e. "short", "long",
"shortOffset", "longOffset", "shortGeneric", "longGeneric")day-period
: the day period (i.e. "narrow", "short", "long")era
: the era (i.e. "narrow", "short", "long")locale-matcher
: the locale matcher (e.g. "lookup", "best fit")%option-value<key>
: the value of the specified option (e.g.
"%option-value<displayInfobar>" for the value of the "displayInfobar" option)
SingleFile can receive messages from other extensions. The messages must be sent to the extension ID of SingleFile and must be a string containing one of the following values:
"save-page"
: save the current page
"edit-and-save-page"
: edit the current page in the annotation editor and save it
"save-selected-links"
: save all the links in the selected content
"save-selected-content"
: save the selected content
"save-selected-tabs"
: save the selected tabs
"save-unpinned-tabs"
: save the unpinned tabs
"save-all-tabs"
: save all the tabs
Please follow these steps if you find an unknown issue:
Suggestions are welcome :)