[Greasemonkey] Improved Greasemonkey
zboogs at gmail.com
Mon Apr 4 01:01:59 EDT 2005
Mother of god. This is awesome, Ben. Thanks!
It will take a long time to pick apart and integrate, though.
More replies inline...
> I figured, now page script beating chrome? That just ain't right!
Agreed. I had wanted to fix this another way, but it's queued behind a
list of other patches, plus regular work. Thanks for the quick fix. It
seems like you know quite a bit about XPCOM development. Can I hit you
up with questions about other things, as they come up?
> * Mozilla now supported; tested with 1.0. I'd imaging later versions are
Awesome, this has been asked for a few times.
> * Consolidated Tools menuitems into a single new menu, as with Adblock.
Not sure about this. Do other people like it?
> * Replaced the 40-line convert2RegExp() [eeew...] with the latest
> Adblock version (12 lines)
> * When installing a user script from the tools menu, get the script text
> from the rendered document, rather than re-downloading it. This means
> that the gzip-compression bug is fixed, and it also gets rid of the
> rather ugly DM "flash".
So you use XMLHttpRequest instead of the download manager? The reason
I used it was that I wanted some sort of visible status for
downloading the scripts. Not having it seems rude in a different way.
Though I do agree for the tools menu thing.
> * Do a full read of config.xml from disk only on first-run and on save,
> since those are the only possible change points.
Well, technically, somebody could change it with a text editor. I
guess it's ok if they have to restart in those cases. Were you
experiencing delays, or did it just bother you?
> * Use XPCNativeWrapper to ensure access to native functions like
> * Added a dialog for users to edit scripts directly. Barebones but
I have a crazy GUI design going for this that I wanted to work on this
weekend, but didn't get to it. I guess this could be cool in the
> I also tightened up Mark's hijacker script, but that's about as useful
> as rewriting your idle loop.
My idle loop? what?
> As it turns out, thanks to the sheer number
> of introspection points in the DOM, concealing actual modifications is a
> rather futile challenge. Event listeners are lost when their principal
> node is removed from the DOM tree, too. Now, chrome still wins, just not
> through Greasemonkey -- a dedicated extension need never touch the DOM
> itself, and can thus remain completely undetectable to page script.
How so? You mean by modifying the source code before it hits the browser?
More information about the Greasemonkey