Created
October 16, 2019 08:22
-
-
Save nhymxu/1455171d294322cfa3f9e19fe35def03 to your computer and use it in GitHub Desktop.
js detect adblock
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
<!-- adblock detected --> | |
<script type="text/javascript"> | |
var adblock = true; | |
</script> | |
<script type="text/javascript" src="/adframe.js"></script> | |
<script type="text/javascript"> | |
if(adblock) { | |
alert('notice'); | |
} | |
</script> | |
<!-- end adblock detected --> |
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
adblock = false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment