]> git.gir.st - LegacyFox.git/blob - config.js
recreate all properties of AddonSettings automatically
[LegacyFox.git] / config.js
1 // keep this comment
2 try {
3 let Xdb = Cu.import('resource://gre/modules/addons/XPIDatabase.jsm', {});
4 Xdb.XPIDatabase.isDisabledLegacy = (addon) => false;
5 Xdb.XPIDatabase['SIGNED_TYPES'].clear();
6 Xdb.AddonSettings = {
7 ...Object.fromEntries(Object.getOwnPropertyNames(Xdb.AddonSettings)
8 .map(e => [e, Xdb.AddonSettings[e]])),
9 "REQUIRE_SIGNING": false,
10 "LANGPACKS_REQUIRE_SIGNING": false,
11 "ALLOW_LEGACY_EXTENSIONS": true, // <=fx73
12 "EXPERIMENTS_ENABLED": true, // >=fx74
13 };
14
15 const {FileUtils} = Cu.import('resource://gre/modules/FileUtils.jsm');
16 Components.manager.QueryInterface(Ci.nsIComponentRegistrar)
17 .autoRegister(FileUtils.getFile('GreD', ['legacy.manifest']));
18
19 const {AddonManager} = Cu.import('resource://gre/modules/AddonManager.jsm');
20 const {BootstrapLoader} = Cu.import('resource://legacy/BootstrapLoader.jsm');
21 AddonManager.addExternalExtensionLoader(BootstrapLoader);
22 } catch(ex) {
23 Components.utils.reportError(ex.message);
24 }
Imprint / Impressum