I visit a site that recently has started blocking pages if the ABP extension is installed (even if I turn it off for this site), using JavaScript to see if nsIAdblockPlus is in Components.interfaces. The code used is roughly this:
Code: Select all
<script>
if(document.all){ci= new Array(1,2);}
else{ci=Components.interfaces;}
if("nsIAdblockPlus" in ci){
document.write('ad block detected');
var bod = document.getElementsByTagName("html");
bod[0].innerHTML = '<p align="center"><font face="Century Gothic">--some annoying stuff I won't repeat</font></p>';
}
</script>