Hello,
From the information you provided, I am unsure what problem you are having. I just verified this plugin works using the official, widely used AdBlock Plus add-on/extension in Chrome and Firefox. If the plugin isn’t working can you please let me know what browser, what operating system, and exactly what ad blocker you are using (perhaps a link to the listing from the browser’s web store/directory). Lots of extensions have similar names and logos to try and capitalize on the original AdBlock Plus’s popularity, so sometimes the name isn’t enough.
————————
Without more information, based on your post I can only guess there is a misunderstanding as to how this plugin works, so allow me to elaborate.
Most ad blockers work by preventing content on their block lists, and content that is obviously an advertisement, from loading at all. Others by simply hiding the ad so the end-user can’t see it.
Due to variety of ways ad blockers accomplish their task, and the variety of potential content site administrators use that might be blocked, this plugin looks to see whether pre-determined content is blocked and uses that as it’s sole criteria for detecting ad blockers. It inserts into the page, or attempts to load, juicy content that most ad blockers will flag. At the moment, it uses 3 items.
- First, an iframe element pointing to a fake URL loaded with keywords ad blockers hate (e.g ‘advertisement’).
- Second, a <div> with similar keywords in class and ID attributes, and within the <div> itself.
- Third, a JavaScript file with a name that, again, sets off alarm bells for the ad blockers.
If any of these 3 items are prevented from loading or are hidden or obscured, the plugin acts as if an ad blocker exists. If all 3 items are present and seemingly unmodified, it acts as if no ad blocker exists. Based on that information, the plugin determines which content to show (the ad block detected content, or the no ad block detected content).
The plugin does not rely on any content provided when creating an Ad Blocking Detector shortcode for detection, and should be immune to subtleties like ad blockers blocking images instead of divs because it uses strategically created bait items to do its job.
Which of these methods works depends on the ad blocker. By far the most effective is the JavaScript file. Every ad blocker I’ve tested with blocks the JavaScript file. But most also block one or more of the others.
For easier debugging, the plugin outputs a report to the JavaScript console in your web browser. Here is a sample report from the AdBlock Plus Chrome extension. AdBlock plus blocks the iframe and JavaScript file. Therefore, the plugin displays the ad block detected content.
ABD Detector:: iframe removal detected! (Detection Method: iframe css changed to hidden - frame.css('visibility') === 'hidden' || frame.css('display') === 'none')
ABD Detector:: No div removal detected
ABD Detector:: js removal detected! (Detection Method: Bait javascript file prevented from loading and execution!)
If you want to see it yourself, visit the plugin’s demo page and view your JavaScript console (sometimes called “web console,” “console,” or “developer console” depending on the browser).
—————————–
I hope this has helped, and let me know the details requested at the beginning of this post (and any others you think of that are relevant) if not.