Strange issue using localStorage in a GM script

94 views
Skip to first unread message

Massimiliano Calamelli

unread,
Dec 28, 2010, 10:57:32 AM12/28/10
to greasemonkey-users
Hi all, I found a strange issue using localstorage in a GM script.
Looks like GM sandbox doesn't allow me to access to
window.localStorage.length.
I started a discussion in GitHub with test case (see
https://github.com/greasemonkey/greasemonkey/issues/issue/1243).
Could someone confirm that?

Thank you uin advance

Massimiliano

RodMcguire

unread,
Dec 28, 2010, 3:55:33 PM12/28/10
to greasemon...@googlegroups.com
I can confirm this (winVista FF 3.6.13)

The strange thing is that running his test userscript seems to mess up the new Goggle Groups interface history. This might make sense if nGG uses localStorage to maintain the history and calling localStorage.setItem, localStorage.getItem, or localStorage.length from within a userscript somehow TRASHES localStorage.

Note that the test script runs on http://www.google.it/ and really shouldn't be able to affect https://groups.google.com/

(this 'trashing' may have also prevented my first attempt in nGG to reply to this from working).





Massimiliano Calamelli

unread,
Dec 28, 2010, 4:32:29 PM12/28/10
to greasemon...@googlegroups.com

Thank you very much tor your test. I hope that this thread will increase the visibilty of the bug.

Massimiliano

> --
> You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
> To post to this group, send email to greasemon...@googlegroups.com.
> To unsubscribe from this group, send email to greasemonkey-us...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
>
Reply all
Reply to author
Forward
0 new messages