Reputation: 682
I'm working on a firefox addon and one thing i'm unsure on is how to remove user preferences related to my addon when the user uninstalls it. The preferences get set, and if the user uninstalls and reinstalls the preferences are all still there. Some settings also relate to a first time install, so that breaks if the user has installed it previously.
Is there something I can setup that will be called when a user uninstalls, or a process to remove preferences on uninstall?
Thanks!
Upvotes: 7
Views: 533
Reputation: 4682
You'll want to take a look at this page which shows you how to register an observer to get the right events. Note that it's not always 100% reliable, but there should be a way to do this in Firefox 3.7 (Gecko 1.9.3).
Upvotes: 2
Reputation: 1500
There is no way to do this. Addons are simply deleted off by the browser and not told that they will be uninstalled. You could provide a 'Restore Factory Settings' button somewhere on your add on GUI.
Upvotes: -1