I am grabbing the text from a web page and trying to save it so I can use 
the text in a menu somewhere else.

Grabbing text:

if (window.location.pathname == "/app/list) {
    jQuery(function($) {
        var listOfUsers = $("a[href$='javascript:void(0)']").map(function() 
{
            return this.text;
        });
        var listS = "";
        console.log(listOfUsers);
        for (var i = 0; i <= listOfUsers.length; i++) {
            listS += listOfUsers[i] + ",";
        }
        GM.setValue("users", JSON.stringify(list));
    })
}

When trying to read the save I have tried:
var menuList = GM.getValue("users");
menuList = GM.getValue("users", "noreturn") + "";
menuList = (async function(){return await GM.getValue("user", 
"noreturn");})();

but every time I try and read the information it just returns a promise
console.log(menuList);



<https://lh3.googleusercontent.com/-a27KEktO8G4/WxregqV7CjI/AAAAAAAAC2E/S2jKWbv_fJsildSijyfSM_bjNnF1dJtDQCLcBGAs/s1600/Capture.PNG>

Am I missing something or doing something wrong? Or is it supposed to 
return a promise and if so then how do I use the Promise?














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