Wednesday, 15 July 2015

firefox addon - How to set a default preference only when the extension installs -



firefox addon - How to set a default preference only when the extension installs -

i using firefox sdk extension development. firstly, not want expose preference user. want preference used within extension code handling.

my usecase want reset preference when user re-install extension. don't want reset preference when user restart firefox or disable/enable extension.

one way tried utilize get/set apis of "preferences-service" within main.js code. main.js code run everytime restart firefox or disable/enable extension. re-writes initial value preference main.js code runs again.

is there way using sdk reset preference value during installs , not during firefox restart & disable/enable of extension?

the self module exposes loadreason property.

firefox-addon firefox-addon-sdk

No comments:

Post a Comment