Detect AdBlock with JavaScript in my browser

30-07-2017 AdBlock javascript detect

Basically Adblocker is used to hide the ads in the website. We can find adblocker existed / installed or not by using javascript. 

Below is the code for detect adblocker in browser by using javascript.

<html>
    <head>
        <title>Check Adblocker existed Using Javascript</title>
        <script>
            window.onload = function() {
                setTimeout(function() {
                    if (typeof(window.google_jobrunner) === "undefined") {
                        alert("adblocker is existed");
                    }else{
                        alert("no adblocker found.");
                    }
                }, 3000);  
            };
        </script>
    </head>
</html>

 

 

You might also like:

Example for Conditional Operator in php
16-04-2017 php Conditional Operator example
How to redirect one page to another page in php
20-03-2017 redirect php
Remove last two characters from given string
06-03-2017 substring javascript remove
How to set or update or push the values into Object in javacript
27-02-2017 javascript set update push object
Call a function every second or 5 seconds in javascript
22-02-2017 setinterval function calling