[Greasemonkey] Long literal strings of html

Julien Couvreur julien.couvreur at gmail.com
Wed Apr 20 18:27:59 EDT 2005

On 4/20/05, Edward Lee <edilee at gmail.com> wrote:
> Nice ;) Much cleaner :) But no fun with anonymous functions + closures!

Actually, there is an anonymous function and a closure involved.
function() {...} captures the local scope that contains "getContents",
"getScriptChrome" and "script".

One question about this piece of code ("injectScript" function). 
How come we're setting these GM_* on the windows object? 
I noticed the function above it ("greaseLoad") actually deletes these
references. But I don't understand why we need to set them in the
first place.


More information about the Greasemonkey mailing list