Labs/Weave/Developer/HowToSynchronizeAddOnPrefs: Difference between revisions

From MozillaWiki
< Labs‎ | Weave‎ | Developer
Jump to navigation Jump to search
(Created page with 'Weave Sync by default syncs preferences such as those accessible from the Firefox UI. Add-ons can leverage preference sync to have user-set add-on preferences synced so that chan…')
 
No edit summary
Line 5: Line 5:


A preference will be synced if a corresponding prefixed-preference is
A preference will be synced if a corresponding prefixed-preference is
set to true. The prefix is "extensions.weave.prefs.sync.", so if
set to true.  
|extensions.weave.prefs.sync.browser.startup.page| is |true|, the
|browser.starup.page| will be synced. An easy way to set these
preferences to |true| is to add the entry to the default preferences
for the add-on.


https://developer.mozilla.org/en/Default_Preferences
The prefix (note the trailing period) is <tt>extensions.weave.prefs.sync.</tt>.
 
 
So if <tt>extensions.weave.prefs.sync.browser.startup.page</tt> is <tt>true</tt>, the <tt>browser.startup.page</tt> preference will be synced.
 
An easy way to set these preferences to <tt>true</tt> is to add the entry to the default preferences for the add-on.  You can read about that at https://developer.mozilla.org/en/Default_Preferences

Revision as of 23:27, 4 February 2010

Weave Sync by default syncs preferences such as those accessible from the Firefox UI. Add-ons can leverage preference sync to have user-set add-on preferences synced so that changes to add-on settings will propagate to other synced clients.

A preference will be synced if a corresponding prefixed-preference is set to true.

The prefix (note the trailing period) is extensions.weave.prefs.sync..


So if extensions.weave.prefs.sync.browser.startup.page is true, the browser.startup.page preference will be synced.

An easy way to set these preferences to true is to add the entry to the default preferences for the add-on. You can read about that at https://developer.mozilla.org/en/Default_Preferences