Sites Blocking Adblock

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
Slavoc

Sites Blocking Adblock

Post by Slavoc »

Ive been using adblock plus for a long time now and have greatly appreciated the lack of ads, tis quite nice :P Unfortunately a few sites ive visited have started to implement anti-adblock scripts which somehow detect if adblock is being used, this is the script they invariably use:

Code: Select all

<script language="javascript">
setTimeout('detect_abp()', 2000);
var isFF = (navigator.userAgent.indexOf("Firefox") > -1) ? true : false;
var hasABP = false;

function detect_abp() 
{
	if(isFF) 
	{
  	if(Components.interfaces.nsIAdblockPlus != undefined)
    {
    	hasABP = true;
    }
    else 
    {
      var AbpImage = document.createElement("IMG");
      AbpImage.id = 'abp_detector';
      AbpImage.src = '/textlink-ads.jpg';
		  AbpImage.style.width = '0px';
      AbpImage.style.height = '0px';
      AbpImage.style.top = '-1000px';
      AbpImage.style.left = '-1000px';
      document.body.appendChild(AbpImage);
      hasABP = (document.getElementById('abp_detector').style.display == 'none');
      
			var e = document.getElementsByTagName("iframe");
		  for (var i = 0; i < e.length; i++)
		  {
		  	if(e[i].clientHeight == 0)
		   	{
		   		 hasABP = true;
		   	}
		  }
		 	if(hasABP == true)
		 	{
  			history.go(1);
				location = "please_disable_adblock.aspx";
    		window.location(location);		
  	 	}
    }
  }
}
</script>
How do i stop these pesky sites from forcing me to look at ads? :)
Any help is much appreciated :P

On a side note i hope this is in the right forum....
User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

Whitelist the image they use to check it:

Code: Select all

@@*/textlink-ads.jpg|$image,match-case
Matt Nordhoff
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

EasyList was fixed a few days ago without whitelisting.
User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

Oh, I see that.
Matt Nordhoff
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Peng wrote:Oh, I see that.
Just keeping a low profile about it. Shhhh....
User avatar
cuzz
Posts: 30
Joined: Thu Oct 11, 2007 3:59 am
Location: redwood deck
Contact:

Post by cuzz »

rick752 wrote:Shhhh....
:lol:
Soren

Post by Soren »

Peng wrote:Whitelist the image they use to check it:

Code: Select all

@@*/textlink-ads.jpg|$image,match-case
I have the same problem with other sites I visit, but adding that line doesn't work and neither does updating easylist.
The scripts are identical except for the page they redirect you to.

Code: Select all

<script language="javascript">
setTimeout('detect_abp()', 2000);
var isFF = (navigator.userAgent.indexOf("Firefox") > -1) ? true : false;
var hasABP = false;

function detect_abp() 
{
	if(isFF) 
	{
  	if(Components.interfaces.nsIAdblockPlus != undefined)
    {
    	hasABP = true;
    }
    else 
    {
      var AbpImage = document.createElement("IMG");
      AbpImage.id = 'abp_detector';
      AbpImage.src = '/textlink-ads.jpg';
		  AbpImage.style.width = '0px';
      AbpImage.style.height = '0px';
      AbpImage.style.top = '-1000px';
      AbpImage.style.left = '-1000px';
      document.body.appendChild(AbpImage);
      hasABP = (document.getElementById('abp_detector').style.display == 'none');
      
			var e = document.getElementsByTagName("iframe");
		  for (var i = 0; i < e.length; i++)
		  {
		  	if(e[i].clientHeight == 0)
		   	{
		   		 hasABP = true;
		   	}
		  }
		 	if(hasABP == true)
		 	{
  			history.go(1);
				location = "http://www.ocmodshop.com/support_this_site.aspx";
    		window.location(location);		
  	 	}
    }
  }
}
</script>
User avatar
Hubird
Posts: 2850
Joined: Thu Oct 26, 2006 2:59 pm
Location: Australia
Contact:

Post by Hubird »

I noticed that site loads a 1x1 gif called "transdot.gif". Is that a web bug ? (I can't tell if it is being blocked or not bcause I can't view the site!!)

http://en.wikipedia.org/wiki/Web_bug
cuzzz

Post by cuzzz »

Would using Platypus to manipulate the value of hasABP be a better option than whitelisting?
Wladimir Palant

Post by Wladimir Palant »

GreaseMonkey will usually work as well.
Aristo

javascript addon pages

Post by Aristo »

I have similar problem:

<script type='text/javascript'>
var imgcount29326=new Image();
imgcount29326.src='http://adc.zoznam.sk/adcount.fcgi?gid=2 ... &cap=0|1|0';
</script>

how can I ban this??
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Try adding:

Code: Select all

/adcount.fcgi?
Aristo

Post by Aristo »

rick752 wrote:Try adding:

Code: Select all

/adcount.fcgi?
No :(
this code doesn't block element
Has anybody some other idea?

problem is on http://www.zoznam.sk (with enabled javascript).
Wladimir Palant

Post by Wladimir Palant »

I used this filter:

Code: Select all

|http://adc.*
Locked