Diskusie » Vývoj

GM_setValue and GM_getValue

§
Pridaný: 14.05.2014
Upravený: 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.dpdns.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!

§
Pridaný: 14.05.2014

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

§
Pridaný: 14.05.2014

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

§
Pridaný: 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 :(

§
Pridaný: 17.05.2014
Upravený: 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.

§
Pridaný: 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

Pridať odpoveď

Aby ste mohli pridať odpoveď, prihláste sa.

长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元