Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to request users to disable Ad Blocker for my website in Q2A site?

+3 votes
asked Oct 4 in Q2A Core by eswar22
How to request users to Block Ad Blocker in Q2A site?. In Wordpress we have some plugins where we can ask user to distable adblocker for my site. But how can we do this for Q2A site.
commented Oct 5 by eswar22
can someone please help on this.

1 Answer

+1 vote
answered Oct 5 by esqeudero

Try below script on your body tag. 

  var test = document.createElement('div');
  test.innerHTML = '&nbsp;';
  test.className = 'adsbox';
  window.setTimeout(function() {
    if (test.offsetHeight === 0) {
        window.alert('PLEASE, disable your AdBlocker !!!');
  }, 100);

You can add it from theme-base.php file.

Find public function body_script() and add there.