English · 中文
DevTools Unlock is a Chrome Web Store extension that also ships a Firefox 128+ Manifest V3 build. The injection model is the same as Chrome: per-host whitelist, scripting.registerContentScripts with world: "MAIN" and runAt: "document_start".
Official references:
scripting.executeScript| Item | Value |
|---|---|
| Firefox | 128 or newer (strict_min_version) |
| Gecko ID | devtools-unlock@webliang (stable; required for AMO / persistent installs) |
| Permissions | storage, scripting, tabs, host <all_urls> |
<all_urls> is required so enabling a site can inject into cross-origin player iframes whose hosts are not known at install time. Optional origin permissions cannot cover those frames before they exist. Same justification as the Chrome Web Store listing.
pnpm installpnpm build:firefox (or pnpm dev:firefox for watch)about:debugging#/runtime/this-firefoxdist/firefox/manifest.jsonTemporary add-ons disappear when Firefox quits. Persistent install is AMO or a signed zip with the Gecko ID above.
utils/manifest-parser (when __FIREFOX__=true):
background.service_worker → background.scripts + type: "module"browser_specific_settings.gecko (id, min version, data_collection_permissions: none)content_security_policy.extension_pagesoptions_ui (this product has no options page)minimum_chrome_versionRuntime:
webextension-polyfill in the backgroundinjectImmediately omitted on Firefox executeScript (MAIN-world early inject still uses registerContentScripts at document_start)unlock.js / embedWatch.js remain classic IIFE (no import())pnpm build:firefox:zip # add-on → releases/*.firefox.zip
pnpm pack:firefox:sources # source (no node_modules) → releases/*.firefox-sources.zip
The add-on zip is the contents of dist/firefox/ (not the git repo). AMO also requires the source archive because the add-on is a Vite/esbuild production bundle. Rebuild steps: SOURCE.md. How to pack: SOURCE.md.
Listing draft: LISTING.en.md. This repo does not auto-submit to AMO.
pnpm build:firefox
pnpm lint:firefox