javascript - Possible ways of detecting Adblock? I've tried so many things -


so i've signed adsense , put in on url shortening project. ad displayed on header of site. (above navbar). , when users have adblock enabled, pretty ruins header part of site.

now did research, found a topic here already, didn't me @ all.

if has ways of detecting adblock, appreciate it!

function handle_adsense_blocker() {   if (typeof(window.google_jobrunner) == 'undefined') {    // doesn't seem work opera   if ( navigator.useragent.match(/opera/i) ) {     return;   }   // replace adsense ads else   }  }  // add window load event window.settimeout('handle_adsense_blocker()', 3000); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -