Firefox 4 provides some events to detect when a user uninstalls an extension. I can get onUninstallingto start (when the user clicks to remove the extension), but I can’t do anything when it works onUninstalled(what should happen after the restart).
Components.utils.import("resource://gre/modules/AddonManager.jsm");
AddonManager.addAddonListener({
onUninstalled: function(addon){
alert("uninstalled!");
},
onUninstalling: function(addon){
alert("uninstalling!");
}
});
Ultimately, I hope to show the page after the user disables my extension. I would rather do it after onUninstalled, if I could.
source
share