Mike Dives Into Greasemonkey
I wrote my first Greasemonkey script this week. I consider this a big step in my JavaScript self-education.
The script wasn’t complicated. I’d post it, but it was for an internal report that I’ve been working with so it really wouldn’t be worth your time. The report is a list of customer and some information about them. My XML version of the report went by customer ID, but the report on the web only had customer name — but it did have the Customer ID as a tooltip (why? Who knows?) So my Greasemonkey script just found the Customer ID in the tooltip and put it next to the customer name. The only big deal was the regular expression that found the ID in the JavaScript function that makes the tooltip. Yeah, the HTML sucked.
I wouldn’t have been able to do it without Mark Pilgrim’s excellent Dive Into Greasemonkey, which is really his Greasemonkey Hacks book online.
Next step: Using YUI in GreaseMonkey Scripts. Then the outside-world website hacking will begin!!
Powered by ScribeFire.