Fork of tsaost/autoload-temporary-addon — updated for modern Firefox versions.
Firefox does not allow permanently installing unsigned, self-developed extensions. The only way is to load them as "temporary add-ons" via about:debugging, but they are lost on every restart.
The original project solved this using Firefox AutoConfig (userChrome.js), but stopped working with Firefox 136+ because Mozilla removed the legacy JSM module system (Services.jsm, AddonManager.jsm, FileUtils.jsm).
This fork replaces the old JSM imports with the new ESM equivalents:
// Old (broken in Firefox 136+):
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm");
Components.utils.import("resource://gre/modules/FileUtils.jsm");
// New (works in Firefox 136+):
var Services = globalThis.Services;
var { AddonManager } = ChromeUtils.importESModule("resource://gre/modules/AddonManager.sys.mjs");
var { FileUtils } = ChromeUtils.importESModule("resource://gre/modules/FileUtils.sys.mjs");Tested on Firefox 148 (Linux).
# Linux:
sudo cp config-prefs.js /usr/lib/firefox/defaults/pref/
# macOS:
sudo cp config-prefs.js /Applications/Firefox.app/Contents/Resources/defaults/pref/
# Windows (as admin):
copy config-prefs.js "C:\Program Files\Mozilla Firefox\defaults\pref\"Open userChrome.js and add your extension paths to installUnpackedExtensions():
function installUnpackedExtensions() {
installExtension("/home/user/my-extension");
installExtension("/home/user/another-extension");
}# Linux:
sudo cp userChrome.js /usr/lib/firefox/
# macOS:
sudo cp userChrome.js /Applications/Firefox.app/Contents/Resources/
# Windows (as admin):
copy userChrome.js "C:\Program Files\Mozilla Firefox\"Your extensions will be automatically loaded at startup.
- Your extensions must have a
browser_specific_settingsentry inmanifest.jsonwith a uniquegecko.id, otherwise local storage will be lost on restart:"browser_specific_settings": { "gecko": { "id": "your-extension@example.com" } }
- This is functionally identical to clicking "Load Temporary Add-on" in
about:debugging— it just happens automatically. - The extensions require files in the Firefox install directory (
/usr/lib/firefox/), which needs admin/root access. This is not a new security concern — if an attacker has write access to that directory, they can already modifyfirefoxitself.
Mozilla does not provide a "Developer Mode" like Chrome. The only alternatives are:
- Sign extensions through Mozilla (requires account + internet)
- Use Firefox ESR or Developer Edition (can disable signature checks)
- Load via
about:debuggingevery time (lost on restart)
See Bug 1309288 for the long-standing feature request.