Thank you very much, I would never have figured out this async function.
Today it's too late, but tomorrow I will try your code!



Am Mittwoch, 22. November 2017 23:30:29 UTC+1 schrieb Plenz:
>
> I studied the GM wiki, I studied this group, but I don't get it. To be 
> honest: I never heared about this asynchron stuff until today.
>
> I found here in this group
>
> let sData = await GM.getValue("serialised") ; 
> let oData = JSON.parse(sData) ;
>
> but it does not work for me. Perhaps I have to declare or initialize 
> "await" and "JSON", but I don't know.
>
> Simple example:
>
> GM.setValue("myvar", "foo");
> var result = "empty";
> var sData = await GM.getValue("myvar");
> result = JSON.parse(sData);
> alert(result);
>
> What do I have to add and/or correct to get an alert which shows "foo"?
>
> Thank you very much in advance for help. And whatever it is, it should be 
> implemented in the GM wiki ASAP!
>
>

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