Some notes on building and updating a Firefox extension. In this case, it’s my send-tab-url add-on for sending the current tab’s URL to a designated server.
Access the extensions area with about:debugging
and in This Firefox
there’s an option to Load Temporary Add-on
.
This lets me choose the root directory of my add-on, which is the directory that contains the file manifest.json
.
I can use Inspect
to open a developer window with the console and debugger etc. for the extension’s context. Note, the DOM for the pop-up is entirely separate from the current tab’s DOM.
# Build the zip file that's suitable to upload to Mozilla rm ../send-tab-url.zip; zip -r -FS ../send-tab-url.zip * --exclude .git --exclude *.swp
There is a script build_package.sh
in the project directory that builds the zip file, named according to the version found in the manifest file. It automatically excludes the files that are not part of the installable extension package.