Firefox Add-on SDK 1.6.1 is it possible to make an uninstall button?
button, firefox, firefox-addon-sdk, uninstallation
Solution
Ok, I figured it out:
const {Cu} = require("chrome");
let AddonManager = Cu.import("resource://gre/modules/AddonManager.jsm").AddonManager;
...
uninstallExtension(require("self").id);
...
function uninstallExtension(id) {
AddonManager.getAddonByID(id,function(addon){addon.uninstall();});
}
Problem
I am writing a Firefox Add-on. My boss wants a license agreement to pop up (Got that, it's working), the user can Accept or Decline. I want the Decline button to uninstall the Add-on. Can an Add-on SDK 1.6.1 Add-on uninstall itself? Thanks in advance.