[Greasemonkey] Cross-script configuration data sharing
Gareth Andrew
freega at freegarethandrew.org
Sat Jan 7 13:00:40 EST 2006
On Sat, 2006-01-07 at 10:53 +0100, BachusII wrote:
> Oke, a different approach.
>
> It occurs to me that when you want separate scripts to be able to access
> each others data a fair amount of the code would be the same. Exactly
> the situation where a library would come in handy.
>
> Let user scripts keep the current method. Only the one script can
> read/write its own data using GM_setValue and GM_getValue.
> Give the library system its own data methods. GM_lib_setValue and
> GM_lib_getValue
> User scripts can store data either in their own dataspere, or in any one
> of the included libraries dataspheres.
>
> This should keep (most of) your data save from other scripts.
I think keeping your data safe from other scripts is a non-issue. I
think the only problem would be if you could have an accidental
conflict, otherwise scripts accessing other scripts data is a feature,
in my opinion (meta-user-scripts anyone?).
Gareth.
More information about the Greasemonkey
mailing list