[Project_owners] To give the good example...

Jaap Haitsma jaap at haitsma.org
Sat Sep 11 20:22:45 EDT 2004


yaa at euronet.nl wrote:
> I have a on topic question that some of you might have a answer for.
> 
> 1. Is there a way my chrome app can be alarmed when the uninstall extension 
> function of Firefox is invoked?
> My app is a sidebar that needs to be closed on uninstall, if kept open it will 
> corrupt the profile and leaves a empty open sidebar when uninstalled.
> If my app can intercept some flag or hook some callback then it can close the 
> bar itself on uninstall.

Don't know

> 2. Is there a way to set preferences at the preferences service on 
> installation of my application?
> I want to give my app some default preferences on installation but not 
> persistant thereafter so when changed by a user it keeps the users settings 
> ever after.

What I always did (see for example dictionarysearch) was just detect if 
there was already a preference and if not I would set it with the default.

A better way is to use a default preference file. The autohide extension 
   for example does this. That extension is not hosted on mozdev.org but 
you'll find it at update.mozilla.org

Jaap


More information about the Project_owners mailing list