Open K2SO4AL2SO4324H2O opened 3 years ago
This doesn't work on firefox. Here's a minimal fix:
if (error.message === 'Failed to fetch' || error.message === 'NetworkError when attempting to fetch resource.') {
adBlocked = true;
}
Even simpler soultion
<script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
$('#test').append(window.adsbygoogle?.loaded ? 'Ads not blocked' : 'Ads blocked');
</script>
Note: This method is a little heavy handed and actually requires the user to completely disable adblock, or not have it installed.