BoingBoing Ad Remover · Curiosity is bliss

Curiosity is bliss    Archive    Feed    About    Search

Julien Couvreur's programming blog and more

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.

______________________________________

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

below the others, it makes it look much better.

Posted by: Sam (March 15, 2005 03:01 PM) ______________________________________

Thanks for the tip Sam. Included the change.

Posted by: Julien Couvreur (March 15, 2005 03:15 PM) ______________________________________

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

Posted by: Sam (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 (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 (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 (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 (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 (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 (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 (March 16, 2005 04:02 PM) ______________________________________

Thanks Jeremy. Just subscribed ;-)

Posted by: Julien Couvreur (March 16, 2005 05:19 PM) ______________________________________

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

Posted by: Pedro (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 (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 (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 (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 (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 (March 17, 2005 10:00 PM) ______________________________________

Thank you, Jesse.

Posted by: Pedro (March 18, 2005 06:23 AM) ______________________________________

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

Posted by: Stephen A (March 18, 2005 12:24 PM) ______________________________________

here's the page:

http://dialedin.us/boing/

Posted by: Stephen A (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 (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 (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 (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 (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 (June 2, 2005 11:59 AM) ______________________________________

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

Posted by: Eightway (July 14, 2005 08:16 AM) ______________________________________

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

Posted by: Mr. Flibble (August 18, 2005 12:47 PM) ______________________________________

It's still working for me.

Posted by: Julien (August 18, 2005 03:26 PM) ______________________________________

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

Posted by: answered (September 9, 2005 02:22 AM)
comments powered by Disqus