checking for ad blocking...
Welcome to Adblock detector
Adblock Detector is a work, derived from a small project earlier found at Show IP.Adblock Detector is a javascript, that can help site owners to detect ad blockers like Adblock Plus.
It is not bullet proof, but definitely better than nothing, if you want to make sure your visitor are not blocking your ads!
The script is compressed and encrypted, so that it is harder to find out what is going on.
Don't worry though! you can use a tool like Firebug, to see that the script does not send any information to any server!
It merely does it's thing, and gives you the possibility to act on it.
Besides the examples below, you could of course be creative and do some ajax stuff, so that you could store the info in a database.
You could even do some cooke validation!
I hope you find this page useful :-)
Best regards
Dan Larsen
Using the Adblock detector
The most basic way to use this script, is to download the compressed script.Then insert the following code, as close to the </body> tag of your page as possible:
<script type="text/javascript">
// You can choose to have one function handling everything
// A variable containing true og false will be send as the first argument
var _abdStatusFnc = '[function name]';
// or use two seperate to handle each case
// you can choose to use only one of these two as well
var _abdDetectedFnc = '[detected function name]';
var _abdNotDetectedFnc = '[not detected function name]';
</script>
<script type="text/javascript" src="[path to your script]"></script>
Of course you must replace:
[path to your script]
with the path to the downloaded script.[function name]
with the name of a function you have created to handle any status.[enabled function name]
with the name of a function you have created to handle enabled status.[disabled function name]
with the name of a function you have created to handle disabled status.Alternatively, you can use the script from our server by replacing [path to your script] with http://adblockdetector.com/script.php
Working examples of using the Adblock detector
EXAMPLE #1 - 2 handler functions
<html>
<head>
<title>Adblock Detector Example #1</title>
</head>
<body>
Example #1 for using Adblock Detector
<script type="text/javascript">
function _enabled() {
alert('detected');
}
function _disabled() {
alert('not detected');
}
var _abdDetectedFnc = '_enabled';
var _abdNotDetectedFnc = '_disabled';
</script>
<script type="text/javascript" src="http://adblockdetector.com/script.php"></script>
</body>
EXAMPLE #2 - 1 handler function
<html>
<head>
<title>Adblock Detector Example #2</title>
</head>
<body>
Example #2 for using Adblock Detector
<script type="text/javascript">
function _status(isDetected) {
alert('detected: '+isDetected);
}
var _abdStatusFnc = '_status';
</script>
<script type="text/javascript" src="http://adblockdetector.com/script.php"></script>
</body>
Download Adblock detector
Current version is 1.0bPrevious versions will not be available... That would make it easier to reverse engineer the scripts
Download: version 1.0b