I fully understand your problem. I was presenting what it probably the best solution of those solutions that currently exist (expect perhaps storing them on an external site - with the overhead that would involve). You didn't provide enough information to determine if it's valid in your particular situation (use of sub-domains, etc.).

In fact, local storage DOES persist after a Firefox restart, and a PC restart. The data is actually stored in a sqlite file in the FF profile directory. To clear it external of a script, you must take the "clear ALL cookies" option from the FF option interface. Clearing selective cookies, even clearing all the cookies for the domain for which you've saved local storage data, will not remove it. Since a lot of site customization is lost when clearing all cookies, this would not be seen as inconsistent behavior.


On 6/13/2011 11:30 AM, LWChris wrote:
Hi Matt, I'm not sure you understood my problem correctly. It's not
some common variable, but common and persistent values like settings.
Persistance means they survive a Firefox and a PC restart. Just like
the behaviour of the preferences in about:config.

GM_setValue and co. are the perfect blueprints for this, so all in all
the implementations should hardly be anything more than copy and
paste:

Copy the functions, replace the script-name variable with the "/
common/" string, add the "Common" bit to the functions' names and
register/declare the functions in the sandbox object. I haven't looked
into the GM source code deep enough to find the part at github, but
from what I know about JS and OOP that should be all the work. Maybe
modify GM_listValues and add an optional boolean parameter whether to
include common parameters in the returned array, default to false, and
add GM_listCommonValues that uses the calling script's namespace.
That's it...

On 13 Jun., 00:08, Matt Sargent<[email protected]>  wrote:
Just use Local Storage. That will at least handle all scripts operating
in the same domain.



--
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.

Reply via email to