[Greasemonkey] function failed in 0.64
Chris Hayes
chayes at antenna.nl
Tue Jan 3 23:50:55 EST 2006
Oh yeah I forgot to mention them, they are simply wrappers.
I made the attachment which shows the same error.
Since it is so short I will save you the effort to open the attachment
if you do not want to install it:
unsafeWindow.GM_SET = function(name,val){GM_setValue(name,val);}//wrapper
unsafeWindow.GM_GET = function(name){return GM_getValue(name);}//wrapper
unsafeWindow.GM_GETorDEFAULT = function(name,defaultValue){if
(!GM_GET(name)) GM_SET(name,defaultValue); return GM_getValue(name);}
var BannedUsers = GM_GETorDEFAULT('BannedUsers','|');
Chris
Jeremy Dunck wrote:
> Can you send a user script demonstrating the problem as an attachment?
> I don't see anything wrong with this snippet, assuming you've defined
> GM_GET and GM_SET.
> On 1/3/06, Chris Hayes <chayes at antenna.nl> wrote:
> > I think this function is not recognized.
> > I have this problem probably since I upgraded to GM 0.64. Before that I
> > might have (<--sorry..) had 0.61.
> >
> > unsafeWindow.GM_GETorDEFAULT = function(name,defaultValue){if
> > (!GM_GET(name)) GM_SET(name,defaultValue); return GM_getValue(name);}
> >
> > (when called, i get the error: Error: GM_GETorDEFAULT is not defined )
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gm_set_test.user.js
Type: application/x-javascript
Size: 559 bytes
Desc: not available
Url : http://mozdev.org/pipermail/greasemonkey/attachments/20060103/1e421fd0/gm_set_test.user.js
More information about the Greasemonkey
mailing list