- Enable the browser console (
about:config
->devtools.chrome.enabled=true
) and open it. - Copy the following code change the to your xpi file path and insert it into the browser console.
Cu.import('resource://gre/modules/addons/XPIInstall.jsm')
Cu.import('resource://gre/modules/addons/XPIProvider.jsm')
Cu.import('resource://gre/modules/addons/XPIDatabase.jsm')
var nsIFile = Components.Constructor( "@mozilla.org/file/local;1", "nsIFile", "initWithPath" );
var xpiFile = new nsIFile('<full path to xpi>');
var addon = await XPIInstall.loadManifestFromFile(xpiFile, XPIInternal.XPIStates.getLocation('app-profile'));
addon.signedState = 4;
addon.appDisabled = false;
XPIInstall._activateAddon(addon)
- Addon will have access to all the legacy APIs and browser internals.
- This doesn't preserve the addon after restart, there might be a way to do it, needs more research.
- I was annoyed that Mozilla decided not to let users choose to run webextension experiments in stable/beta version of the browser even as a temporary extension.