Skip to content

d-pollard/adblock-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Browser Adblock Detection

A script I've wrote in order to detect if adblock is active on a browser :-)

Usage:

To use this repo, simply pullt the repo into your project and insert the following javascript in your page:

<script type = "text/javascript">
    var adblockCallback = function(isBlocked){
        if(isBlocked){
            alert("You have adblock enabled");
        } else {
            alert("Adblock is off");
        }
    };
</script>
<script type="text/javascript" src = "./ab-detect/js/test.js" class = "adBlockTest"></script>

Note: remember to edit the adblockCallback to do what you need once the detection is finished!

About

A script I've wrote in order to detect if adblock is active

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published