elidickinson/ad-block-test

Demo page with Firefox

masj opened this issue · 2 comments

masj commented

Hi

On your demo page with Firefox I found that if adblock plus is disabled (i.e. it's set to actually show ads on the page), the demo widget (where you click Check Now) still says that Adblock was detected.

So I was experimenting with the whole concept and everywhere around the internet I find people using the height of an ad element to determine if the ad is visible or not.

Why not just use jquery .is(':visible') on the element ids ? I tested this on both Chrome and Firefox and when ad blocker is enabled all ad containing divs return false for .is(':visible'). Any reason to not use this technique ?

Yup, there's definitely an issue there. FWIW, it does show up as "false" is AdBlock is completely disabled, but true if it's disabled only on the current site. I'm going to try to fix that tonight.

I'll double check how ':visible' works because I'm not sure that will do it: the element still is technically visible according to 'visibility' and 'display' styles, but is blank and often 0 height. I'd also ideally like to avoid requiring jQuery if I don't have to.

I pushed a quick fix for now. It's interesting though: being able to detect how many people have AdBlock installed but not active on your site could be a very interesting metric!