4 ms·
I wrote a quick and dirty AdBlock detector a while back: https://github.com/elidickinson/ad-block-test https://github.com/elidickinson/ad-block-test Haven't lo
by eli 12y ago
I wrote a quick and dirty AdBlock detector a while back: https://github.com/elidickinson/ad-block-test https://github.com/elidickinson/ad-block-test
Haven't looked at that code in a while. It probably needs some updating, but the core idea is simple: create something that looks like an ad and then check if it's still visible.
- Macha 12y agoDoesn't seem to detect ABP 2.6.4 on FF for me.
- eli 12y agoEDIT: I think it just needed the name of the dummy ad updated. Try it now: http://esd.io/blog/detecting-adblock-javascript.html http://esd.io/blog/detecting-adblock-javascript.html I specifically wanted a self-contained solution, but assuming your site has ads in the first place, a better approach would be to see if your actual ads are loading on the page or not. http://www.Fark.com/ http://www.Fark.com/ does this (load the page with adblock and then wait a few seconds)