Created
January 22, 2019 20:48
-
-
Save adambirds/14ecb611ba4d1be89fe48fa8d20cabc9 to your computer and use it in GitHub Desktop.
Hide ad widget if ad blocker is on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function(){ | |
var test = document.createElement('div'); | |
test.innerHTML = ' '; | |
test.className = 'adsbox'; | |
document.body.appendChild(test); | |
window.setTimeout(function() { | |
if (test.offsetHeight === 0) { | |
document.getElementById("et_ads-2").style.display = "None"; | |
} | |
test.remove(); | |
}, 100); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment