suggest moving the data from prefs.js to its own file. [FIXED]

Any feedback, suggestion, bug reports, problems....
Posts: 2
Joined: Fri Feb 25, 2011 10:21 pm

suggest moving the data from prefs.js to its own file. [FIXED]

Post by angelofiumara » Sun Feb 27, 2011 1:01 am

The info for your wonderful extension is kept in prefs.js in the main profile subdirectory, which is where lots of extensions keep their data as well, making this file a monolith and a mess. But a number of extensions keep their data in a separate file under their subfolder for their extension. Would you consider moving Flagfox data to its own file? The advantage with this is that I can sync this file using Syncplicity from my desktop to my laptop and have the same lookups on both computers. Now I have to manually sync them by either using your options dialogue twice or cutting and pasting from one prefs.js to another. Just syncing the main prefs.js is not an option for me, because there are settings there that need to be different on each computer.



User avatar
Flagfox Developer
Posts: 723
Joined: Wed Oct 03, 2007 9:06 pm
Location: Philadelphia, USA

Re: suggest moving the data from prefs.js to its own file.

Post by DaveG » Sun Feb 27, 2011 8:46 am

You can sync the Flagfox actions using Mozilla's Sync service. Flagfox 4+ has had experimental support for it since the beginning, though it's preffed off in about:config. For Flagfox 4.1 under a recent version of the Firefox Sync extension or Firefox 4.0 with it built in, go to about:config then toggle services.sync.prefs.sync.flagfox.actions to true and do a sync. It works, but you have to sync manually to get it to work well. I plan to add a checkbox in the main options dialog for this at some point and find a way to get it to sync up better on its own.

As to how much data is crammed in the JSON preference, lets just say Flagfox is nothing in comparison to other things that use this method. The JSON preference for storing used Personas easily gets much larger and Mozilla's Test Pilot extension can suck up unholy amounts of space with its giant JSON blob.

I consider putting the actions list in its own file every once in a while, but it is a preference and does belong there, technically. The nice thing about preferences is that when you create an extension you can also create a simple file that has the defaults for each preference, which is where the default actions list is. Once the user changes something, then it ends up in prefs.js in the main profile dir, but for most people who use defaults it doesn't need saving there. In fact, if you change something then change it back to the default, it drops it from prefs.js automatically (which is standard for all prefs). Because of this I'm leaning towards just continuing to use the standard preferences system as I am now.

Posts: 5
Joined: Thu Nov 07, 2013 10:35 am

Re: suggest moving the data from prefs.js to its own file.

Post by windozer » Thu Oct 22, 2015 10:16 pm

I just enabled services.sync.prefs.sync.extensions.flagfox.useractions in FF.

I had a pleasant surprise the last time I did a reinstall when my greasemonkey scripts automagically appeared. In FF sync, I have addons and pref unchecked, however GM settings has synce option checked. So I suppose Flagfox works similarly. Hopefully when I do another reinstall of FF I'll see my custom actions back.