JavaScript function to detect the presence of an ad blocker. More info in the blog post on AdGlare Ad Server.
Include the JS file, and then call the function hasAdblock()
.
<script src='adblock-detection-script.js'></script>
<script>
if(hasAdblock()) {
//do something
} else {
//do something
}
</script>