Using jQuery library with Greasemonkey

Subscribe to Using jQuery library with Greasemonkey 3 posts, 3 voices

 
engtech Scriptwright

I've written a blog post about how I use the jQuery library with Greasemonkey:

http://internetducttape.com/2008/05/08/greasemo...

I thought some of you might find it interesting, as it's a really excellent way of increasing your productivity when writing Greasemonkey scripts (don't have to worry about DOM/XPath traversal anymore).

 
Mikado Scriptwright

Well, I think it's ok if target site is already using jQuery, but if it doesn't,

engtech wrote:

jQuery will turn a 700 line Greasemonkey script into a 12 line Greasemonkey script

makes no sense due to 26KB jQuery size. Only parsing it takes about 200ms on sorta fast PC, not every PC has half  this power. Not even mentioning the worst-case scenario when you download the script every time (OMG). So you should decide which is more important - to write the script faster or to write script that works better. And if you use scripts more often than you make them, I'd suggest latter.

 
sizzlemctwizzle Scriptwright

Personally I hate using huge libraries. I only like including functions in my scripts that I actually need. Quit being lazy and write scripts yourself.