Publish a browser extension
ActivitiesProjects
Make a browser tool that changes a page on command and package it so someone else can install it.
Publishing a browser extension turns a small folder of HTML, CSS, and JavaScript files—using browser extension APIs to add features—into a package other people can install in Firefox or Chrome through a store listing or direct distribution. At the center of that folder sits `manifest.json`, a configuration file that names the extension, sets its version, and wires up the icons, scripts, or interface files it uses. A first project works best when it does one narrow job. Two classic starting patterns show the range: a content script that runs on matching web pages to add or change page content—such as the Borderify starter example, which draws a border around Mozilla pages—or a toolbar button wired through an `action` field that opens a small HTML popup when clicked, as in Chrome's Hello World example. Those are starting designs rather than mandatory parts; an extension only needs the pieces its single behavior calls for.
Testing locally before you package
Before zipping anything for distribution, load the extension directory directly into your target browser and exercise the exact behavior you built. In Firefox, open `about:debugging`, click This Firefox, choose Load Temporary Add-on, and select a file inside the extension folder; that temporary install clears when Firefox restarts, and you will need to reload it after editing a content script. One common snag when testing page-modifying scripts in Firefox is trying them on `addons.mozilla.org`, which blocks content scripts from running. In Chrome, the extensions page (`chrome://extensions`) lets you enable Developer mode and load the unpacked extension directory, then click the toolbar action if your extension uses one to verify that the popup renders and behaves as expected.
Permissions, manifest metadata, and review readiness
Before submitting, review the permissions, data disclosures, and manifest metadata your extension declares, and check each browser's current store documentation since review policies evolve. Under Manifest V3, an extension cannot load and execute remotely hosted code. Keep the extension focused on a clear single purpose and strip any unused permissions from `manifest.json` before uploading, because requesting broader permissions than necessary can cause rejection in Chrome Web Store review. Any user-data collection or transmission must be declared honestly and match the extension's privacy policy.
Firefox adds its own manifest metadata under `browser_specific_settings`. Under Mozilla's Manifest V3 rules, an extension needs an explicit Gecko add-on ID to be signed, even if you plan to distribute it yourself rather than list it publicly. New submissions to `addons.mozilla.org` (AMO) also declare data practices through `gecko.data_collection_permissions` in that section; an extension that neither collects nor transmits data declares `none` in its `required` array, while one that handles user data must describe what it actually does. If your build step minifies or obfuscates the code so reviewers cannot easily read it, prepare a separate source-code package to upload alongside the extension, and write reviewer notes—including dummy login credentials if part of the extension sits behind an account.
Packaging, distribution, and updates
Once local testing passes, archive the extension files into a ZIP-format package—a `.zip` file for the Chrome Web Store, or a `.zip`, `.xpi`, or `.crx` archive for Firefox. For Chrome, you upload the ZIP through the Chrome Developer Dashboard, complete the store listing, privacy, and distribution details (along with test instructions or credentials if needed), and submit for review. Review times vary by item, and you can opt for deferred publication if you want to release the approved extension manually rather than going live right away; check Chrome's publishing documentation for current dashboard options and timing rules.
Firefox separates signing from public listing. Under Mozilla's signing policy for Firefox release and beta builds, an extension needs to be signed before ordinary installation, passing through automated validation and possible manual review in the Add-ons Developer Hub with a Mozilla account. From there, you choose between two distribution paths:
- Public AMO listing: Provide the listing metadata—name, summary, description, categories, support details, license, and any required privacy policy or reviewer notes. Firefox updates users automatically when you upload a new version from that existing listing's page rather than creating a new entry.
- Self-distribution: The package still goes through Mozilla's signing process, but it stays unlisted—neither publicly viewable nor installable from AMO. Because AMO does not serve updates for unlisted packages, you decide how users receive updates; if you want Firefox to handle updates, you can add an `update_url` in your Firefox manifest settings pointing to an update manifest.
Sources
- developer.mozilla.org · What are WebExtensions
- developer.mozilla.org · Your first WebExtension
- developer.chrome.com · hello world
- developer.chrome.com · cws dashboard privacy
- developer.mozilla.org · browser specific settings
- extensionworkshop.com · submitting an add on
- developer.chrome.com · publish
- extensionworkshop.com · signing and distribution overview
