Created
May 19, 2020 10:05
-
-
Save sdiama/ff0b982252e2b54f88ca4107851df848 to your computer and use it in GitHub Desktop.
Check if Adblock is present - Simple and Effective
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="adsbygoogle mycontent">This is my content</div> | |
<script> | |
setTimeout( function() { | |
if ( $('.mycontent').length > 0 ) { | |
if ( $('.mycontent').is(":hidden") || ! $(".mycontent").length ) { | |
alert('AdBlock Detected'); | |
} | |
} | |
}, 1000); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment