I'm having a problem trying to disable Firefox extensions programmatically. Right now, I'm modifying the extension.json file , changing the 2 parameters , active and userDisabled , but without any success. Despite the fact that in the extension menu it appears to be disabled , the icon of extensions still appear in the toolbar and I can see that the extensions still work. Is there a way to make this work using C++ ?
That won't work you have to use AddonManager.jsm to change the property like this:
Cu.import('resource://gre/modules/AddonManager.jsm');
AddonManager.getAddonByID('Profilist@jetpack', function(addon) { //id of the addon
console.info('addon:', addon);
addon.userDisabled = false; //set to true to enable it
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With