GlimmerMonkey

A couple weeks ago I came across GlimmerBlocker, a proxy-based ad-blocking System Preference for OS X. I’ve been using Safari AdBlock for as long as I can remember so I wasn’t that interest in its ad-blocking features. What caught my attention was that, even though it was designed for Safari, because it acts as a proxy, any browser that supports proxies can benefit from it’s rules. And GlimmerBlocker’s rules are quite powerful.

You can use regular expressions to match urls. Then depending on the url, inject site-specific (or not) CSS and JavaScript. But not just CSS/JavaScript designed to block ads. It’s essentially a cross-browser GreaseMonkey. If you use WebDAV or MobileMe you can publish the rules you create and share them with other GlimmerBlocker users.

Unfortunately, I have access to neither but the rules are easy enough to share even without. Here’s two to get you started.

The first adds a fixed position Mint icon to the bottom right corner of the browser window if Mint is installed on the current site. (Handy for seeing if you’ve missed any pages on your site.) Open up the GlimmerBlocker System Preference pane and click on the Filters tab. Add a new filter named “Mint.” Then add a new rule to “Mint.” Under the Rule tab change the Action to “Whitelist/modify content.” Change Host to “all hosts” and add a description to Comments. Mine reads, “Adds icon to sites that have a Mint.” Then click on the Transform tab. and paste the contents of minted.txt into the text field making sure “Only for content-type” is set to “html.” I’ve been using the Transform tab rather than the dedicated CSS or JavaScript tabs because they don’t seem to play nice with partial documents like Ajax requests. Save and you’re done.

The second is probably more interesting for the non-Mint junkies. It adds two new options to the navigation column on Twitter. It adds a link to your profile page on Favrd and a search form for search.twitter.com—prepopulated to search out indirect @replies. Follow the same steps as above to create a Twitter Filter and rule. Set the Host to “java regexp” and its value to (www\\.)?twitter\\.com. This time paste the contents of twitter-ego.txt into this rule’s Transform tab. Save and you’re done.

At this point both rules should be working in Safari. To enable them in Firefox, open up its Preferences and select the Advanced tab. Click on the Network tab. Then click on the “Settings…” button under Connection. Choose “Manual proxy configuration.” HTTP Proxy should be localhost and by default GlimmerBlocker runs on Port 8228. Click Okay and Firefox is now using GlimmerBlocker as well.

Previous
No Carrier ROMs
Next
Coming Soon
Author
Shaun Inman
Posted
January 29th, 2009 at 6:38 pm
Categories
Apple
CSS
JavaScript
Mint
Web