public
Last active

Check if browser uses an adblocker

  • Download Gist
advertisement.js
JavaScript
1
window.usesNoAdBlocker = true;
index.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<!doctype html>
<html>
<body>
<script type="text/javascript" src="advertisement.js"></script>
<script>
if("usesNoAdBlocker" in window) {
alert("Cool. You are supporting this site :)");
}
else {
alert("Would be realy great if you could support this website.");
}
</script>
 
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.