<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<script src="https://rawcdn.githack.com/magiclen/adblock-checker/master/dist/adblock-checker.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Strait">
<div class="container" style="font-family: 'Strait', sans-serif;">
<div class="row">
<h4>Check if the current web browser has any ad blockers checker</h4>
<div id="sonuc" style="margin-bottom:10px" >...</div>
<br>
<small class="well">Check if the current web browser has any ad blockers (AdBlock, Adblock Plus, uBlock, AdGuard, ...) enabled.</small>
<br style="word-break: break-all;"><br>
<a class="btn btn-link" target="_blank" href="https://github.com/magiclen/adblock-checker">Reference Git</a>
</div>
</div>
$(document).ready(function(){
let checkIsRunning = false;
const runCheck = async () => {
if (checkIsRunning) {
return;
}
checkIsRunning = true;
const hasAdBlock = await AdBlockChecker.checkAdBlock();
if (hasAdBlock) {
$("#sonuc").html("<div class='btn btn-success btn-lg'>Adblock is enabled</div>"); //addClass("btn-success").text("Adblock is enabled");
} else {
$("#sonuc").html("<div class='btn btn-danger btn-lg'>Adblock is disabled</div>"); //addClass("btn-success").text("Adblock is enabled");
}
checkIsRunning = false;
};
runCheck();
setInterval(runCheck, 1000);
});