Skip to content

Instantly share code, notes, and snippets.

@damien-list
Created September 18, 2012 16:07
Show Gist options
  • Save damien-list/3743975 to your computer and use it in GitHub Desktop.
Save damien-list/3743975 to your computer and use it in GitHub Desktop.
Test if AdBlock activated
<div id="ads_bottom" style="position: absolute; bottom: 0; right: -5000px; width: 100px; height: 100px;"></div>
onload = function() {
if (document.getElementById('ads_bottom').offsetHeight == 0) {
alert('Désactivez AdBlock !');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment