Thursday, April 28, 2011

How to block/detect Adblock by jQuery


<div class="myTestAd" style=" text-align:center;margin:10px">
 <!-- advert code goes here -->
</div>


function TestPage() {
    if ($('.myTestAd').height() == 0)
        alert("You are blocking my beautiful adverts, you swine!");
}

$(TestPage);

http://thepcspy.com/read/how_to_block_adblock/

No comments:

Post a Comment