How to check if an adblocker has blocked a javascript file

920 views Asked by At

Adblocker installed in chrome is blocking all the javascript files which has 'Ads' word in its name.Is there a ways to check if the user is using an adblocker for his browser and alert him to disable adblocker inorder to view the page

1

There are 1 answers

1
UweB On

This is not bullet proof - but upon document ready, you could check for a variable that is defined in the *ads*.js file. If it is not defined, the file was not loaded, thus potentially blocked by an ad blocker.