povpie / adblock-detection-script

JavaScript function to detect the presence of an ad blocker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adblock Detection Script (JavaScript)

JavaScript function to detect the presence of an ad blocker. More info in the blog post on AdGlare Ad Server.

Usage

Include the JS file, and then call the function hasAdblock().

Example

<script src='adblock-detection-script.js'></script>
<script>
  if(hasAdblock()) {
    //do something
  } else {
    //do something
  }
</script>

About

JavaScript function to detect the presence of an ad blocker.


Languages

Language:JavaScript 100.0%