I keep some user data in simple-storage
. When the user uninstalls the add-on I want to remove this user data. Is there some event or something similar?
Click the menu button. and choose Add-ons and Themes. The Add-ons Manager tab will open. Select the panel for the type of add-on you wish to view or manage, such as the Extensions or Themes panel.
This will work in every file:
require("sdk/system/unload").when(function(reason) {
if (reason == "uninstall") {
// do uninstall stuff..
}
});
Try this:
exports.onUnload = function(reason) {
//do stuff for unload here
}
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