Thank you for the reply but I am not sure you are correct in that. I
know that I am using it properly and consistent with the documentation
and I have no reason to set alert on setValue, if anything it would be
on getValue such as this example: GM_log(GM_getValue("foo"));
So consistent with that example, if I do alert(GM_getValue("foo")); it
should not give me the error that its giving me above, so I am
thinking there has to be something else. In the meantime I will try
using the .toString() method and see if that yields something
different, thanks.
On Jul 26, 2:43 am, esquifit <[email protected]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---