Whether you are new to Mac OS X or a long time user, there’s a decent chance that you use Safari for your daily web browsing activities. If you’ve recently switched from Windows or Linux, you may have been using Mozilla Firefox or Google Chrome. You could get those on your Mac, but Safari is already there and it’s made by Apple, so it just works out of the box.

While I like Safari’s integration with Mac OS X, sometimes I wish I could teach it a few tricks – tricks that are often learned only through GreaseMonkey user scripts. Well, Safari 5, as of this writing, does not have a GreaseMonkey plug-in. I was on StackOverflow, (a programming Q&A site which I visit frequently,) and a user there has been working on a user script which adds all kinds of neat functionality to the site. (The script allows users to use keyboard shortcuts and commands to navigate StackOverflow Chat and the main StackOverflow site, instead of using the mouse.) I wanted to test the script, but I didn’t want to use Firefox. I started Googling…

The first relevant result that Google returned was this blog post, on SimpleHelp.net. The blog runs through the process in detail, but I’ll go through it here briefly.

  1. Download and Install SIMBL – (From the SIMBL website) SIMBL, pronounced like “symbol” or “cymbal” enables hacks plugins. In other words, you can “patch” Mac applications to add functionality to them.
  2. Next, download GreaseKit. To install it, drag the GreaseKit.bundle file to ~/Library/Application Support/SIMBL/Plugins If you don’t have a SIMBL/Plugins/ folder, just create it, then drop GreaseKit.bundle into it.
  3. Restart Safari, and you will see a new entry in the menu bar for “GreaseKit”.

That’s all! You should now be able to run user scripts from within Safari. I find it cool that GreaseKit actually detects if you have a raw JavaScript file open that is a user script. Edit:This only works if the file has a .user.js extension apparently. (I learned this from modifying a script and renaming it. On the bright side, Jimmy Wales doesn’t ask for donations anymore.)

I installed SIMBL and GreaseKit today and I am now happily using the user script for the StackExchange websites. (As I said, the script itself is really cool.) Now, maybe I’ll start using user scripts more often…