Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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