Just use Local Storage. That will at least handle all scripts operating
in the same domain.
On 6/12/2011 10:47 AM, LWChris wrote:
Hi,
I've been using GreaseMonkey for a long time now and I've made various
scripts. There's one thing I miss in Greasemonkey very badly: a
function to set and get persistent values accessible for all scripts.
I've got some scripts that are all related, and I'd like to have a
basic script to set default preferences (e. g. language). But there
seems to be no way to make these values accessible for all scripts.
Hence my idea is to provide functions like GM_setValue and co., only
that these do not include the script name but only the namespace for
example. That functions would be GM_setCommonValue, GM_getCommonValue
etc.
greasemonkey.scriptvals.<namespace>/common/<value_name>
You might say it's insecure to have values that are accessible from
all scripts. But I don't think so, because if you know that they are
accessible, you know that you should not store any valuable
information like passwords in it (the preferences aren't a place for
this kind of information anyway).
These functions would make life a lot easier for groups of scripts,
additionally one can maybe provide a tidy-up-script for his namespace
to delete all the global preferences, too :)
Greetings, Chris
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.