Detect AD Blocker  [ 236 views ]

Goal: do we have AD blocker or not?

something like this:

  var testAd = $('<div class="adsbox"> </div>').appendTo($('body'));
  window.setTimeout(function () {
    if (testAd[0].offsetHeight === 0) {
      adBlockEnabled = true;
    }
    testAd.remove();
    console.log('AdBlock Enabled? ', adBlockEnabled)
  }, 100);

enjoy…

#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }