1. I added that because my script was getting the prompt "Warning, all
scripts should specify @grant metadata".  I thought it was weird, but did
it anyway.  It will still do it if there is no @grant data.  I'll change it
to @grant none, or disable that message.
2. Indeed... my mistake.  I changed it on my test script, and it works *on
the test script*.  However, I tried testing it on my old script, and it *still
gives the same error*.  I removed the two requires, and moved
GM_setValue("foo", "bar") to line 13, and received the same error as before
(and yes, I spelled it correct.)
3. I didn't want to specify any @grants, but again, GM was prompting me to
do so, and I got annoyed, so I added it.

the code that is currently failing:

// ==UserScript==
> // @version            2.2
> // @name              Myepisodes Enhanced
> // @namespace        http://userscripts.org/scripts/show/110076
> // @description       Adds download links, a progress bar, season premiere
> alerts, better searching, and a whole lot of customization to MyEpisodes.com
> // @include           http://*myepisodes.com/*
> // @exclude            http://*myepisodes.com/forum*
> // @exclude            http://dev.myepisodes.com*
> // ==/UserScript==
> // Many thanks go to user ReV: http://userscripts.org/scripts/show/29729.
> I used your script as a jumping off point.  I'm even still using some of
> your variables.
>

>
GM_setValue("foo", "bar")


for me, it returns the same message as before.

-Andre

On Thu, Dec 6, 2012 at 6:15 AM, Anthony Lieuallen <[email protected]>wrote:

> On Wed, Dec 5, 2012 at 9:30 PM, Andre Dubois <[email protected]>wrote:
>
>> I went to a random website, and created the following script, which gives
>> me the error "GM_setVar is not defined"
>>
>>
>> // ==UserScript==
>>> // @name        test
>>> // @namespace   http://userscripts.org/scripts/show/110076
>>> // @include
>>> http://www.electrictoolbox.com/pad-number-zeroes-javascript/
>>> // @version     1
>>> // @grant        metadata
>>> // ==/UserScript==
>>>
>>> GM_setVar("Test", "this is a test")
>>
>>
> A) "@grant metadata" is meaningless, that value doesn't do anything.
> B) Of course.  There is no "GM_setVar".
> http://wiki.greasespot.net/Greasemonkey_Manual:API
> C) If you specify any @grants, you have to specify one for every
> (correct/extant) method you want to use.
>
>  --
> 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.
>

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

Reply via email to