BoingBoing Ad Remover

BoingBoing was just pointing at Mark Pilgrim's Google Butler, which strips Google ads and adds a number of useful features.
Since I was just posting about the coming conflicts around ad-filtering, I wanted to have some fun throwing oil onto the fire, as well as experiment with the Greasemonkey extension for Firefox. So here is "BoingBoing Butler" (requires Greasemonkey), which hides all non-content from BoingBoing.

While I'm at it, here's a some challenges to Greasemonkey hackers:

  • Could we use this to bring Google auto-completion to the main Google search page? or add more integration between the various Google services (search, mail, maps,...)?
  • Could this be used to create some in-page annotation using del.icio.us or wikis? or would javascript/domain restrictions prevent that?
  • Create an easy way to find Greasemonkey scripts for a site that you're at. It would search, list and describe all the useful customizations that you could apply to the site. Can this be done by re-using the existing search engines, using a distributed approach (FOAF, a file type or a standard url format?), instead of creating a dedicated directory site with a "search by site" functionality?

And also some questions:

  • How to avoid the blinking effect, as the sidebars are loaded and then hidden? Is it cleaner to completely remove the elements from the DOM, rather than using CSS to hide them?
  • Those user scripts are completely unsecure, aren't they? Any of them could include some spyware/adware script to phone home (log the websites that I visit) or display ads, is that right?

Update (2005/03/15): There is already a user script to do cross-site integration with del.icio.us (for the BBC 3 Radio website). It uses XMLHttpRequest, but requires bypassing some security restrictions using Firefox's prefs.js. Here's more info.

Alf Eaton wrote a little demo spyware user script. It steals the users cookies. It could as well snoop the user's password...
Like Aaron I don't see any trivial fix to this problem.

Posted by Julien on March 15, 2005. Permalink
Comments

if you add:
this.addGlobalStyle('#content { width: 800px }');

below the others, it makes it look much better.

Posted by: Sam at March 15, 2005 03:01 PM

Thanks for the tip Sam. Included the change.

Posted by: Julien Couvreur at March 15, 2005 03:15 PM

no prob.
i just got greasemonkey and i'm hooked.

Posted by: Sam at March 15, 2005 03:18 PM

are you able to get rid of the ad on the top?

and

this.addGlobalStyle('#sidebar-a { display: none ! important }');
why doesn't this work on the archives:
http://boingboing.net/2003_01_01_archive.html

Posted by: sam at March 15, 2005 03:25 PM

Good catch, I never went to the archives. And I couldn't see the top banner, because it was already AdBlocked.

Both of these seem tricky to target and hide. The banner don't have any specific ID, CLASS or NAME attribute. Same thing with the sidebar on the right, for the archives page.
I'll try some more tricks.

Posted by: Julien Couvreur at March 15, 2005 03:34 PM

am i allowed to edit your code to work with other sites and release it? (giving you credit and such)

Posted by: Sam at March 15, 2005 03:41 PM

Of course, it's GPL. Plus you have the source anyways (and it's not much code too...).

Posted by: Julien Couvreur at March 15, 2005 03:53 PM

"Could we use this to bring Google auto-completion to the main Google search page? or add more integration between the various Google services (search, mail, maps,...)?"

yes, quite easily. should be as simple as grabbing the existing script, throwing it into a .user.js file, and making a few dom-edits.


"Could this be used to create some in-page annotation using del.icio.us or wikis? or would javascript/domain restrictions prevent that?"

An upcoming GM version will have a way around the domain restrictions. It could be done today if either of those services provided a javascript-style API to their service ala Google Suggest (because javascript files are not subjected to the same-domain policy the way XML files are).

"Create an easy way to find GreaseMonkey scripts for a site that you're at. It would search, list and describe all the useful customizations that you could apply to the site. Can this be done by re-using the existing search engines, using a distributed approach (FOAF, a file type or a standard url format?), instead of creating a dedicated directory site with a "search by site" functionality? "

I wanted to do this originally by file type, but none of the major search engines can find ".user.js" files because they are overwhelmed by references to the user.js file that is part of mozilla. Unfortunate.

Jeremy dunck, who created the Greasemonkey archive wiki, wants to extend it so that people can thumb-up or thumb-down scripts. This could help head-off possible XSS security problems.

We'll have to do something like this at some point, I'd imagine.

Posted by: boogs at March 15, 2005 04:21 PM

"Create an easy way to find GreaseMonkey scripts for a site that you're at. It would search, list and describe all the useful customizations that you could apply to the site. Can this be done by re-using the existing search engines, using a distributed approach (FOAF, a file type or a standard url format?), instead of creating a dedicated directory site with a "search by site" functionality?"

I think you'd need to have a dedicated directory site *somewhere*, but it could be something as simple as http://del.icio.us/tag/greasemonkey+[sitename], if that were an agreeable convention.

Posted by: Michal Migurski at March 16, 2005 01:09 PM

Please take this discussion to the mailing list, where I've just sent a message on the topic.
http://greasemonkey.mozdev.org/list.html

Subject is "Directory service".

Posted by: Jeremy Dunck at March 16, 2005 04:02 PM

Thanks Jeremy. Just subscribed ;-)

Posted by: Julien Couvreur at March 16, 2005 05:19 PM

Can you make it get rid of all of Xeni's posts?

Posted by: Pedro at March 16, 2005 05:28 PM

I've been thinking about doing something similar with a proxy. I love it. Way to give Cory a taste of his own medicine. The content wants to be free!

Posted by: Christopher Baus at March 16, 2005 08:51 PM

Contrary to Pedro's rather *rude* comments -- I think Xeni's posts are quite excellent. I believe an apology is in order.

However, with regards to content, perhaps it might be more resource-optimal to parse and strip adds from the RSS feed, and then rebuild the content, instead of stripping stuff directly from the HTML page.

At the *very* least, you'd be saving the authors a bunch of bandwidth, which is the real reason for the ads in the first place...I mean, removing ads are fine as a technical tour-de-force, but you must realize that you are effectively preventing Cory from recieving advertising revenue and effectively styming him from keeping the site alive -- I mean, consider what Cory would have to do if every single BB reader decided to do this?

Posted by: Aurelius at March 17, 2005 07:28 AM

Aurelius, that's the point.
Do you think that Mark's "Google Butler", that BoingBoing was advertising and which removes the Ads and inserts links to its competitors, makes Google any money?

Posted by: Julien Couvreur at March 17, 2005 03:51 PM

I personally think that many of Xeni's posts are excellent, but some are to much for work. So I wrote a script to remove hers...

I like Xeni and hope she takes no offence, this just allows me to view BoingBoing at work...

http://sweb.uky.edu/~jdandr2/greasemonkey/de-Xeni.user.js

Posted by: Jesse Andrews at March 17, 2005 08:12 PM

Jesse, I was going to try and implement a similar approach, for some fun, but you beat me to it ;-)
On the other hand, I added a user script for skipping IGN's annoying interstitial ad pages (see GreaseMonkey wiki for the url).

Posted by: Julien at March 17, 2005 10:00 PM

Thank you, Jesse.

Posted by: Pedro at March 18, 2005 06:23 AM

Or just use this page and filter boingboing to your heart's content

Posted by: Stephen A at March 18, 2005 12:24 PM

here's the page:

http://dialedin.us/boing/

Posted by: Stephen A at March 18, 2005 12:25 PM

Julien,
In case you didn't notice, my site (69.90.152.144 which you commented on before) now has a domain name. It's http://dunck.us/anabasis/ ;-)

Posted by: Jeremy Dunck at March 18, 2005 04:35 PM

Google Suggest greasemonkey extention from Adrian Holovaty here:
http://www.holovaty.com/blog/archive/2005/03/19/1826

Posted by: Craig at March 21, 2005 08:17 AM

WELL i hate xeni and i use Jesse's script and love it. Add the BoingBoing Butler and BoingBoing is now almost 100% readable.

Can someone make a script that removes all Cory's posts with the word "Cory" in it? I know Cory is blogs about himself because nobody else will, but that doesn't mean i have to read it. "DRM" would be a good keyword too.

Posted by: MRSMASHY at April 1, 2005 11:45 AM

When using BoingBoing butler and clicking the back button the whole browser closes.

Example:
http://www.boingboing.net/2005/05/11/funny_photo_on_craig.html

Click on the image, and then try to return to the original page by clicking the back button.

I am using Firefox 1.0.4

Posted by: Srijith at May 13, 2005 07:39 AM

The BoingButler script is amazing. It also raises the question, "what good is a creative commons license if your content is so layered with advertising that it gets unreadable?"

All the marxists become New Economists when the cash registers start ringing. And I would too. And so would you.

Also, this post originally had the word social*st, but the spam filter didn't like the word c-i-a-l-i-s

Priapic Marxists, unite!

Posted by: craniac at June 2, 2005 11:59 AM

How about a GM script to remove Cory's posts about Disneyland?

Posted by: Eightway at July 14, 2005 08:16 AM

Am I the only one for whom this script stopped working today? :(

Posted by: Mr. Flibble at August 18, 2005 12:47 PM

It's still working for me.

Posted by: Julien at August 18, 2005 03:26 PM

http://gutterfish.com/wwwboard/messages/42.htm higherloosertaste

Posted by: answered at September 9, 2005 02:22 AM
Trackbacks
BoingBoing Butler
Excerpt: http://dev.upian.com/hotlinks/archives/2005/03/16/#item32384
Weblog: Groovy Links
Tracked: March 16, 2005 08:06 PM
Greasemonkey
Excerpt: Greasemonkey: This Firefox extension got blogged a bit earlier this week... I'm linking it here because I'm still not sure what to think of it. Greasemonkey walks through an HTML document and rewrites sections via JavaScript so that it behaves...
Weblog: JD on MX
Tracked: March 17, 2005 12:34 PM
Happy Hell's Angels Day & Other DiVERSiONZ
Excerpt: Happy St. Patrick's Day and (oh ya) beware of the Ides of March ( a couple of days late) and all of that. How about an Irish joke that I saw over at Jwalk's blog--Q. What's Irish and sits outside...
Weblog: DiVERSiONZ
Tracked: March 17, 2005 02:09 PM
BoingBoing Butler
Excerpt: I'm just getting into GreaseMonkey, the powerful FireFox extension that provides loads of functionality for customizing the way web pages appear. My first application for it is BoingBoing Butler, which removes unwanted content (namely advertising) fr...
Weblog: exogenous.org
Tracked: March 17, 2005 07:48 PM
HOWTO de-Xeni BoingBoing
Excerpt: Jason Gill says, Someone has posted a script for GreaseMonkey (a Firefox extension that lets you add your own Javascript code to any website, to remove ads or add features: Link) that automatically removes any post by Xeni when viewing BoingBoing." Lin...
Weblog: Boing Boing
Tracked: March 18, 2005 08:27 AM
Re: xeni filter?
Excerpt: it was something to do with greasemonkey..... ... hrm.. script to remov...
Weblog: tribe.net: blog.monstuff.com
Tracked: November 18, 2005 11:14 AM
Comments are closed. You can contact me by email.