I'm using Firefox 10.0 with Greasemonkey 0.9.15. I want to use a userscript, that requires access to local storage. I don't want local storage to be allowed globally.

Is there a way to achieve this goal without modifying userscript?

If userscript modification is necessary, what can I use as the replacement for local storage?

link|improve this question
feedback

1 Answer

The Greasemonkey equivalent of localStorage are the GM_getValue and GM_setValue functions. Just be aware that for example the contemporary Chrome implementation of userscripts doesn't support these (among other things) and if you want your userscripts to work cross-browser, you'll still have to write a fallback function using localStorage.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.