Where does GM_setValue store data, and has that location changed lately?

372 views
Skip to first unread message

Gareth

unread,
Nov 21, 2012, 8:36:11 PM11/21/12
to greasemon...@googlegroups.com
Hello all,

Checking some docs online, I found here: http://wiki.greasespot.net/GM_setValue that it is stored in "greasemonkey.scriptvals.namespace/script_name.value_name" but in this page http://sourceforge.net/apps/mediawiki/greasemonkey/index.php?title=GM_setValue it is stored in "extensions.greasemonkey.scriptvals.namespace/name.foo".

My script recently stopped retreiving data properly, and I noticed that I have all my data stored in "greasemonkey.scriptvals...." but I think the script is now looking in "extensions.greasemonkey.scriptvals...." ( I did a trial set to see where it was stored, and it went to extensions...." )

Can someone let me know which is correct, and if it is the latter, how to restore my data to right place so my script can see it.

Many thanks,
Gareth.

mjh563

unread,
Nov 21, 2012, 8:50:44 PM11/21/12
to greasemonkey-users
It changed in the current version (1.5). It's now using
extensions.greasemonkey.scriptvals, but it should have moved all your
script data over from the old location.

Which version of Greasemonkey are you using? There was an issue with
one of the betas of 1.5 where it didn't move the data, but that should
be fixed in the final release.

On Nov 22, 1:36 am, Gareth <gme...@gmail.com> wrote:
> Hello all,
>
> Checking some docs online, I found here:http://wiki.greasespot.net/GM_setValuethat it is stored in "
> greasemonkey.scriptvals.namespace<http://wiki.greasespot.net/Metadata_Block#.40namespace>
> /script_name <http://wiki.greasespot.net/Metadata_Block#.40name>.value_name"
> but in this pagehttp://sourceforge.net/apps/mediawiki/greasemonkey/index.php?title=GM...is stored in
> "extensions.greasemonkey.scriptvals.namespace<http://sourceforge.net/apps/mediawiki/greasemonkey/index.php?title=Me...>/name<http://sourceforge.net/apps/mediawiki/greasemonkey/index.php?title=Me...>

Gareth

unread,
Nov 21, 2012, 9:06:41 PM11/21/12
to greasemon...@googlegroups.com
Hello,

Umm... In my about:addons page it says 2012.11.19.nightly. Does that sound right? Maybe I am on some bizzare version.

I am using Firefox 16.0.2 on Windows Server. Sorry, I should have mentioned that earlier.

Cheers,
Gareth.

Anthony Lieuallen

unread,
Nov 21, 2012, 9:21:54 PM11/21/12
to greasemon...@googlegroups.com
On Wed, Nov 21, 2012 at 9:06 PM, Gareth <gme...@gmail.com> wrote:
Umm... In my about:addons page it says 2012.11.19.nightly. Does that sound right? Maybe I am on some bizzare version.

Whoops, indeed, the logic to migrate preferences from the old to new location, as broken in the beta build, will also be broken in nightly builds.  It specifically looks for going something like "1.4" (before 1.5) to "1.5".

But in general unless you're a developer or testing a particular bug/fix, you shouldn't be running the nightlies, they're more likely to break.  To make sure things migrate correctly:

https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/

Install 1.4, then 1.5.

Gareth

unread,
Nov 21, 2012, 9:28:19 PM11/21/12
to greasemon...@googlegroups.com
Thanks for the info. I will get onto the 1.4 to 1.5 migration.

I have a feeling something in the distant past was causing conflicts, and the solution was to go to a nightly build of greasemonkey. I probably should have gone back to the release stream when it was fixed.

Cheers,
Gareth.

Gareth

unread,
Nov 21, 2012, 9:48:32 PM11/21/12
to greasemon...@googlegroups.com
Hello again,

Going back to 1.4 gets my data back in the right place. However, going from 1.4 to 1.5 does seem to migrate my data. It is still in the original location in about:config and my script cannot see it in 1.5

If you have any thoughts I am happy to hear them, but I am going to stay on 1.4 for the time being so I can use my script.

Thanks for all your help,
Gareth.

Anthony Lieuallen

unread,
Nov 21, 2012, 10:04:05 PM11/21/12
to greasemon...@googlegroups.com
On Wed, Nov 21, 2012 at 9:48 PM, Gareth <gme...@gmail.com> wrote:
Going back to 1.4 gets my data back in the right place. However, going from 1.4 to 1.5 does seem to migrate my data. It is still in the original location in about:config and my script cannot see it in 1.5

Worst possible case:

1) about:support click the "show folder" function
2) Completely shut down Firefox
3) Open prefs.js in the folder opened before
4) Global search and replace user_pref("greasemonkey with user_pref("extensions.greasemonkey (yes, put those quotes both places)

That will do the migration manually.  If you're on 1.5 then things should be working again.

Gareth

unread,
Nov 21, 2012, 10:23:12 PM11/21/12
to greasemon...@googlegroups.com
That sounds good. I will give it a go later.

Many thanks,
Gareth.
Reply all
Reply to author
Forward
0 new messages