You are probably using GM_set/getValue as a property instead of as function. alert(GM_setValue) yields the code above. Each javascript object has a 'toString()' method which is invoked in contexts where a string is expected, like the argument of alert(). In this case, the implementation of the toString() method for the function object GM_setValue just gives the function definition. GM_setValue is however a function that expects one obligatory and one optional argument. Same for GM_getValue. See [1]
[1] http://wiki.greasespot.net/Greasemonkey_Manual:API On Sun, Jul 26, 2009 at 8:23 AM, GµårÐïåñ<[email protected]> wrote: > > When attempting to use either GM_setValue or GM_getValue in a script > that I am writing for a page, I get this as the "value" > > function () { > var args = staticArgs.concat(); > for (var i = 0; i < arguments.length; i++) { > args.push(arguments[i]); > } > return obj[meth].apply(obj, args); > } > > anyone know why? in getValue it gives me the above code instead of the > value that has been set. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en -~----------~----~----~----~------~----~------~--~---
