My First Puff of Greasemonkey

By Deane Barker on June 21, 2005

Uh oh — I may have started a new addiction…

I’m a subscriber to O’Reilly’s Safari Bookshelf service, which I’ve discussed before. Tonight, I was doing some heavy reading into Microsoft Sharepoint, and I was getting annoyed at the interface. Reading books online is never fun, but I usually just put up with it.

However, for some reason I was suddenly inspired to spend five minutes with Mark Pilgrim’s utterly fantastic “Dive Into Greasemonkey” online book (use the HTML version — the formatting is excellent). I found a script called “Ain’t It Readable,” hacked it up a bit, and quickly had a user script which changed the styles for every page with a “safari.oreilly.com” domain.

Safari is kind enough to be very consistent and well-thought out with their CSS, and so it took just a few style rules to:

  1. Narrow the content section to 500-pixels
  2. Change the font face and size
  3. Insert copious amounts of line height
  4. Underline the headers
  5. Put a background and border on the code samples
  6. Set the opacity on the left menu to 40% so it wasn’t so noticable

I’m so happy I could spit angels. This book is so well-written that it’s taken me three times as long to write this post as it did to effectively change the formatting of every single book on Safari. Mark Pilgrim (and whomever wrote Greasemonkey in the first place), I love you.

(When I get this Safari script dialed in, I’ll post it. If you’re a Safari subscriber, I promise you it’ll make stuff way, way easier to read on that service.)

Gadgetopia

Comments

  1. Hello, my name is Dave and I am a Greasemonkey crack whore.

    It started off simply enough. I and a couple of mates sitting around with nothing to do, browsing the web, you know… We was just kids, bored and stupid.

    Then a guy sidles up to us and offers us a free hit of something he called Greasemonkey.

    The months since then have gone by in a blur. My job — what there is left of it — is a shambles. Personal life? I never had much of one before, but now it’s completely gone. It’s 3AM and there’s no one in the place ‘cept for … me.

    Stop me before I code again.

Comments are closed. If you have something you really want to say, email editors@gadgetopia.com and we‘ll get it added for you.