TabsToFile is a Firefox add-on that allows you to quickly save a selection of tabs. You can export the URLs of tabs that are marked with the cursor, selected through search terms, or simply every tab that's currently open. The exported URLs will first be displayed on a new page and can then be saved as an HTML or TXT document.
- Export Selected Tabs: Export the URLs of tabs that are currently highlighted.
- Export All Tabs in Current Window: Export the URLs of all tabs in the current window.
- Export Tabs by Search Term: Export the URLs of tabs whose titles or URLs contain a specified search term.
On the gutted example.com export page, you can:
- Dark Mode Toggle: Switch between dark and light mode for the export page, if exported to HTML, the selected configuration will be adopted.
- Download as HTML or TXT: Save the exported URLs as an HTML or TXT file.
You can install the latest version of the add-on from the Releases section of this repository.
Alternatively, you can install it from the Firefox Add-ons page.
- Right-click on any tab to open the context menu.
- Choose one of the following options:
- Export selected Tabs' URLs: Export the URLs of the highlighted tabs.
- Export all Tabs in Current Window: Export the URLs of all tabs in the current window.
- Export all Tabs whose titles or URLs contain search term: Open a popup to enter a search term and export the URLs of tabs that match the search term.
The extension requires the following permissions:
tabs
: To access the URLs of the tabs.menus
: To create context menu items.storage
: To store user preferences.contextMenus
: To add items to the context menu.activeTab
: To access the active tab.<all_urls>
: To access all URLs.
Note
There should be a more elegant way without requesting these sketchy permissions. I plan to look into it.
- Node.js
- npm
- Open Firefox and go to
about:debugging
. - Click on "This Firefox". (Should redirect you to
about:debugging#/runtime/this-firefox
) - Click on "Load Temporary Add-on".
- Select the
manifest.json
file from thesrc
directory.
To obtain an installer module you can either zip the folder and rename it to .xpi ('cause that's all they are) like a cheap-ass
Or you can follow Mozilla's official guide and use web-ext
, their Node.js CLI tool, for optimized packaging (eg excluding artifacts like .git or node_modules)
Node.js
npm
an instance of FireFox
-
Clone the repository:
git clone https://github.com/grn-x/TabsToFiles-FirefoxAddon.git cd TabsToFiles-FirefoxAddon
-
Install the
web-ext
tool:npm install --global web-ext web-ext --version
-
Run the add-on:
web-ext run
Note
Press r
in the web-ext
terminal, to trigger an extension reload
- Build the extension:
web-ext build
The resulting file can then be tested locally, or submitted to addons.mozilla.org to be signed
Refer to the official documentation on web-ext
and signing and publishing for more information.
src/background.js
: Contains the main logic for exporting tabs and creating the context menu.src/popup.js
: Handles the popup for entering the search term.src/popup.html
: The HTML for the popup window.src/manifest.json
: The manifest file for the add-on.
Everything from bug reports to feature requests or even direct code contributions are welcome. Please open an issue or submit a pull request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.