[Greasemonkey] Re: Greasemonkey 0.4 beta

Scott Turner srt19170 at gmail.com
Fri Jul 15 22:05:58 EDT 2005

GM 0.4 has a small problem in it that breaks Platypus scripts.

When scripts are injected they're wrapped in a little code. The problem is 
that some code is added to the end of the user script. But if the script 
ends in a comment (as Platypus scripts do), then that last line of code is 
effectively commented out and the script breaks.

The fix is to put in a newline. Here's the change (the code is from 
dochandler.js [which, btw, I insist on reading as "do chandler" maybe from 
seeing too many Friends episodes]):

var toInject = ["(function(",
"GM_xmlhttpRequest, GM_registerMenuCommand, GM_setValue, ",
"GM_getValue, GM_log) { delete window.GM_apis; ",
>>> "\n}).apply(this, window.GM_apis);"


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050715/49d64adf/attachment.htm

More information about the Greasemonkey mailing list