Thanks you for a quick reply, Anthony!

It appears the problem is in my profile somewhere. After creating a new 
clean profile localStorage began saving data well between browser 
stops/restarts. I can't find exact settings in about:config or anywhere 
else which rules this behaviour. I compared both prefs.js but found 
nothing, and these files seem incomplete either (about:config listing is 
much longer than these js files).
What I can't explain is that you say WebStorage API shouldn't work with 
Firefox 57+ due to the new security model for WebExtensions. But in my 
installation it works now:

var users = localStorage.getItem("my_script__users_list") || "[]";

As simple as this. Can't tell why this works.

But I'll note the Content Scope Runner technique you mention for cases when 
nothing else helps.

On Friday, November 17, 2017 at 10:46:06 PM UTC+3, Anthony Lieuallen wrote:
>
> So in Greasemonkey 1.0 - 3.x, @grant none made this "just work", but in 
> GM 4 we don't have the right APIs to retain that feature.  Does your script 
> use any GM APIs?  If not, does this technique help?
>
> https://wiki.greasespot.net/index.php?title=Content_Scope_Runner&oldid=7215
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to