PDA

View Full Version : Script to stop users with ad blocking software.



RichardH
01-06-2015, 01:57 AM
Is it possible to create a script we could all use on our websites that would direct users to a page explaining why?
My thinking is to use elements of adblocks list https://easylist-downloads.adblockplus.org/easylist.txt

If we create a dummy div and put something from adblocks list they would not be able to get around this without hurting their ad blocking capabilities.


<div id="#-ad-banner." height="1px">
<iframe width="360" height="2" src="//www.y.com/-ad-banner." frameborder="0" allowfullscreen></iframe>
</div>


<script type="text/javascript">
jQuery(document).ready(function(){
if (jQuery('#-ad-banner.').height() == 0) {
window.location = 'http://WHY???';
}
});
</script>

I cannot get this idea to work. Anyone have a solution.

Thanks Richard