Skip to content

JavaScript function to detect the presence of an ad blocker.

Notifications You must be signed in to change notification settings

adglare/adblock-detection-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published