
| Browser: | Chrome/Chromium/Iron | Opera | Firefox* |
| Extension: | AdSweep.crx | - | - |
| User script: | AdSweep.user.js | AdSweep.js | AdSweep.user.js |
* partial support, see below.
AdSweep is a small addon maintained by Ariën Holthuizen that aims to hide advertising from the web pages you visit like Adblock. In technical terms, AdSweep is a user javascript that defines CSS rules based on the web site you are visiting to hide elements of the page that show advertisements. If you want to use Opera's Content Blocker in addition to AdSweep, you can use my adblock list.
AdSweep is designed for standard-compliant web browsers such as Opera, Google Chrome, Chromium, Mozilla Firefox 3.1+ or Apple Safari. It works better and faster with Opera and now with Google Chrome. It is a work in progress, more and more web sites are added over time, and if you have basic CSS skills, you can take part and help make the web a cleaner place. To help me out, you can get in touch with me by email.
See how powerful AdSweep is to clean web sites. With advanced CSS pseudo classes to select unwanted elements of the page, AdSweep can remove any advertisement on a page. AdSweep applies filters that identify ads based on common patterns that are specific to banner ads (name of ads, dimensions of banners, anchor tags linking to known advertising servers, combination of tags and properties, etc...). We can also add custom rules based on the current web site to remove unconventional advertisements (usually advertisements that don't go through an advertising network like Doubleclick or Overture). And icing on the cake: AdSweep's flexibility allows regular styling to fix web sites, also on a per-site basis, when needed. Of course, these enhancements and hide-rules are shared among all users, and many users contribute providing fixes and hide-rules.
To compare AdSweep with other popular ad blockers, take a look at Distrowatch for instance. Distrowatch uses unconventional ad patterns because the webmaster places a number of ads that belong to small partners, which means the ads are not easily recognizable from a technical standpoint.
| No ad blocker | Privoxy |
![]() | ![]() |
| Adblock Plus | AdSweep |
![]() | ![]() |
Basically, traditional ad blockers will only block a few ads, leaving sometimes the placeholder empty, as if there were a problem loading the images. AdSweep gets rid of all ads and leaves the page clean.
To install AdSweep download the user script (above) in a directory of your choice (Thanks to Mehmet Buyukozer for his instructions in Turkish).
When you're done, close your browser, reopen it and access adsweep.org, you should see a red notification in the upper-right corner of the page (only displayed on adsweep.org), saying AdSweep is installed. If you would like to see how AdSweep works, here's an example, with the Digg web site:
Using Opera (click to enlarge):
Using Chrome (click to enlarge):
The Chrome Extension will automatically receive updates.
You can also subscribe to my blog at arienh4.net or follow my Twitter account to watch updates.
If you would like to discuss about AdSweep, you can subscribe to the mailing list where community members can participate and ask for support.
If you like AdSweep, AND if you need web hosting, please consider Dreamhost. I have tried several web hosting companies and overall, I like Dreamhost a lot. When you sign up at Dreamhost using this link, they will reward me financially at no additional cost for you. Thanks in advance!
Additionally, as a temporary promotion, you can use the promocode ADSWEEP1 when registering to receive up to 6 months for free, depending on which plan you choose.
If you have some time, AND if you know some CSS, you can submit web sites and their respective selectors to be hidden to my email address. All selectors should be separated by commas, with no spaces. For instance:
digg.com: #block_ad_msft,.item_ad_image,.msad,#comments_ad_msft,.comments_ad_image
Please pay close attention to selectors you send so that my own review be faster. You can brush up CSS selectors and use advanced selectors such as those:
E[foo="bar"]
E[foo~="bar"]
E[foo^="bar"]
E[foo$="bar"]
E[foo*="bar"]
img[width="100"][height="50"]
body>table:nth-child(3)>tbody>tr:last-nth-of-type(2)>td:nth-of-type(4)
Last, but not least, you are welcome to participate financially. I know you can't donate everywhere, but having a cleaner web is pretty cool to have. We're not going to be able to clean all web sites, but we'll clean in priority the domain names you ask to clean so that the most visited web sites look nicer and load faster. If you like the idea and would like to help your way, here's my Paypal account for donations: paypal@arienh4.net - Thank you.
Regarding the complexity of AdSweep, I'm aware of it, but this is why AdSweep is able to be so efficient and versatile at the same time. It is not an URL blocker. Both are complementary, one blocks URLs, the other hides placeholders. There is no way to make AdSweep easier to understand, because of the technical requirements. It's a little like an antivirus. There's no way to add manually a virus to a virus database without resorting to (much more advanced) programming. So the only way is asking either me or a middleman who knows programming.
For instance, there are several ways to block an image on a site, it really depends on the situation. You can select all images of the document, count from 0 until you find the image in the group of images. You can also identify it using an ID. If the image has a class, you can use the class name, only if no other image has the same class name. But many times you have to hide the image using its siblings or parent nodes if no other solution is possible (ie: for dynamic content). Here's a sample code that I use to remove Kontera ads:
if(document.getElementsByTagName("A")){
var anchorTags=document.getElementsByTagName("A");
for(var a=0;a<anchorTags.length;a++){
for(var x=0;x<anchorTags[a].attributes.length;x++){
if(anchorTags[a].attributes[x].nodeName.toLowerCase()=='class') {
if(anchorTags[a].attributes[x].nodeValue=='kLink'){
var textString=anchorTags[a].childNodes[0].childNodes[0].innerHTML;
var newNode=document.createElement('SPAN');
newNode.innerHTML=textString;
anchorTags[a].parentNode.insertBefore(newNode,anchorTags[a]);
anchorTags[a].parentNode.removeChild(anchorTags[a]);
}
}
}
}
}
There's no way to make it more simple. It's not as easy as blocking an URL...AdSweep isn't meant to compete with URL blockers, but it is more comparable to the Element Hider, Privoxy or bFilter. Opera's Content Blocker, or HostMan are good URL blockers. They serve different purposes (blocking URLs vs. hiding content). If you want to use Opera's Content Blocker in addition to AdSweep, you can use the original author's adblock list. There are other lists of common ad patterns on the web, I see several problems with some of them (and this is why I decided to build my own list), it is that they're just lists of ad-selectors found on the web. They don't obey to heuristics, so they don't often apply to unknown web sites. They mainly apply to web sites the author has visited. Also, the lists are quite large, and we have to try to keep the list as small as possible. And, a number of selectors generate false positives, e.g. img[width="728"][height="90"] (this is too aggressive). Other tools allow simple selection of elements on a page; the problem is that with simple selectors such as div#sponsored-links, the selection is more vulnerable to source-code change than either an advanced selector with a pseudo class, or (even better), javascript selection based on advanced patterns or regular expressions.
The AdSweep logo was created by gg3po and is released under the terms of the GPL.