I've been working on a project to help promote ad blocking. It's a web page that will check for ad blocking and recommend an ad blocker if blocking is not detected.

The idea is to make it easier for others to install an ad blocker. It recommends a suitable blocker based on the browser or device detected. It currently checks for Chrome, Firefox, Microsoft Edge, Opera, Safari and iOS devices.

Thanks, that looks really good! I guess the difference is yours is a way for webmasters to promote ad blocking on their existing sites - something I think definitely should be done more. Ours is a page that does only that.

I've used something similar to your code on fivefilters.org - we link to the Block Ads! site recommending an ad blocker if we detect the visitor isn't using one. The method we use there is to hide the link with inline CSS. Then we request ads.css in the HTML header and if that loads (sign of no blocking, because EasyList filters it out), it contains a style rule to display the link. Your way of using GoogleAd in the class attribute is much simpler, but I guess requires the ad blocker to filter elements on the page, not just HTTP requests.

With blockads.fivefilters.org we want it to work for as many different ad block solutions as possible, and on mobile too. So it only makes HTTP requests to known ad server domains. If you use something like an Android DNS-based ad blocker, e.g. https://github.com/julian-klode/dns66, or an ad-blocking VPN, it will detect the blocking. Whereas the element hiding technique, or relying on ads.css wouldn't work.