Greasy Fork is available in English.

Discussions » Development

GM_setValue and GM_getValue

§
Posted: 14.05.2014
Edited: 14.05.2014

GM_setValue and GM_getValue

Hi! I'm looking for a new home for my script since userscripts.org is down. (Script is https://greasyfork.org/scripts/951-survivor-sucks-block-users.) The problem is my script uses GM_setValue to save a list of usernames, and it seems like moving the script to Greasy Fork will cause my users to lose that list. Is there any way of getting around this? In other words, can the Greasy Fork version use the value from the userscripts.org version?

TIA!

§
Posted: 14.05.2014

1. Do NOT change the @name or @namespace metadata of the scripts.
2. Reinstall a script may cause the storage reset.

§
Posted: 14.05.2014

Unfortunately my original script did not have a @namespace key, and GreasyFork requires a @namespace.

§
Posted: 16.05.2014

In case anyone else reads this - Chrome/Tampermonkey uses default namespace null, while Firefox/Greasemonkey uses userscripts.org (or whatever domain the script was hosted at). So there's no namespace that will preserve the GM values with both browsers. Bummer :(

§
Posted: 17.05.2014
Edited: 17.05.2014

recent versions of GM keep script variables in SQLite DB file which, AFAIK, doesn't contain any information about namespace. You can find GM sqlite files in %your_firefox_profile_folder%/gm_scripts/*.db - or - for Chrome - by scanning your system drive for chrome-extension*.localstorage
And there's Firefox add-on called SQLite manager.

§
Posted: 22.05.2014

Actually, the location for chrome (for windows 7) is

Users\[User]\AppData\Local\Google\Chrome\User Data\[Profile]\Local Storage

And, if you aren't using Firefox and the SQLite manager extension, there are portable apps (at portableapps.com) called SQLiteman, or SQLite Database Browser that you can use

Post reply

Sign in to post a reply.