This Firefox extension allows you to save URLs to a bookmark folder by pressing CTRL + ALT and clicking on a link. It uses HTML, CSS, and JavaScript.
- Clone this repository or download the files and place them in a new directory.
- Open Firefox and go to about:debugging#/runtime/this-firefox.
- Click on "Load Temporary Add-on" and select any file in your extension directory.
- The extension should now be loaded in Firefox. To test it, press CTRL + ALT and click on a link. A popup will appear with a dropdown menu to select a bookmark folder. Select a folder and click "Save URL" to save the current URL to that folder.
The extension directory contains the following files:
- manifest.json: The extension's manifest file, which defines the extension's metadata, permissions, and functionality.
- popup.html: The HTML file for the popup that appears when the user presses CTRL + ALT and clicks on a link.
- popup.js: The JavaScript file that handles the popup's functionality, such as populating the dropdown menu with bookmark folders and saving the URL to the selected folder.
- popup.css: The CSS file that styles the popup.
- background.js: The JavaScript file that runs in the background and sets the default bookmark folder on installation.
- icon.png: The 48x48 pixel icon for the extension.
The manifest file defines the extension's metadata, permissions, and functionality. It includes the following keys:
- manifest_version: The version of the manifest file format.
- name: The extension's name.
- version: The extension's version.
- description: A short description of the extension.
- permissions: The permissions the extension requires, such as access to the active tab, storage, and bookmarks.
- browser_action: The browser action that displays the extension's icon in the toolbar.
- background: The background script that runs on installation and sets the default bookmark folder.
- icons: The icon file for the extension.
- commands: The command that defines the keyboard shortcut for saving a URL to a bookmark folder.
The popup HTML file contains a dropdown menu to select a bookmark folder and a button to save the URL to the selected folder. The JavaScript file handles the popup's functionality, such as populating the dropdown menu with bookmark folders and saving the URL to the selected folder.
The background script runs on installation and sets the default bookmark folder. It uses the chrome.storage.sync API to store the default folder ID in the extension's storage.
The icon file is a 48x48 pixel PNG image that represents the extension in the toolbar.
Contributions are welcome! If you'd like to contribute to the extension, please fork the repository, make your changes, and submit a pull request.
This extension is licensed under the MIT License.