Back in — oh, I think it was around 1991 — I had a book called Stupid Mac Tricks, which came with a 3.25 inch floppy disk of INIT files that you could drop into the System Folder on your (or your victim’s) Mac to make it do strange, funny, annoying, and useless things. It was a cool demonstration of what the Mac was capable of, and it inspired me (at age 11) to start on the road to hackerdom.

Stupid Mac Tricks was the inspiration for a presentation I did last Monday for the Design Challenge. It featured the following extensions:

  1. Menubar Madness, which turns all your menus names backwards.
  2. Dodgy Navbar, which makes the buttons in your navigation bar randomly reorder themselves when you click on them.
  3. Kittens Everywhere, which replaces every image on the web with random LOLcats images.
  4. Bookmarks and Preferences, which… actually, this one doesn’t do anything too wacky, it just shows how an extension can set bookmarks and preferences.

For each extension, I took the students through the source code, explained how it worked, and had them do a few simple modifications on each one to get a little hands-on experience. Even though you would never want to, you know, install any of these extensions (at least not on any copy of Firefox you want to be able to actually use…), each one demonstrates techniques that are very useful for advanced extension development. My intention was to make a follow-up to Myk’s Extension Development Bootcamp. Techniques demonstrated include dynamic manipulation of both the XUL and HTML DOM trees, using XPCOM, setting up event handlers, using overlays to replace attributes of XUL elements, using DOM Inspector to find elements you want to overlay, running code on page load, and using XmlHttpRequest. That’s a lot of stuff! I probably erred on the side of trying to cram too many contents into one presentation.

Oh well. It’s all online now, so you can peruse it if you’re interested in learning more about extension development. Here’s the links: