Skip to content

drewjaja/detecting-adblock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Detecting AdBlock

This is a very simple example how to detect if AdBlock is installed. It does not detect if AdBlock has been disabled or if the current site has been whitelisted, so use this carefully not to blame people that might actually have been OK with your site.

Usage

Include adblock-detect.js and call checkAdBlock just before

checkAdBlock(adBlockDetected, adBlockNotDetected);

function adBlockDetected() { // Ad Blocker Detected, do stuff here }

function adBlockNotDetected() { // Ad Blocker Not Detected, do stuff here }

About

A simple way to detect adblock

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 58.2%
  • JavaScript 41.8%