| 开发者 | MythThrazz |
|---|---|
| 更新时间 | 2026年3月31日 04:28 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
class="show-only-when-adblock" — Element appears only when an ad blocker is active.class="hide-only-when-adblock" — Element disappears when an ad blocker is active.<div>, a Gutenberg block, an Elementor section, a WooCommerce notice — anything.
Real-world examples
?tsad_debug=1 to any URL to see live detection results./wp-content/plugins/.class="show-only-when-adblock" or class="hide-only-when-adblock" to any HTML element.Tested and confirmed with: uBlock Origin, AdBlock Plus, AdBlock, AdGuard, Brave Shield, and Opera's built-in blocker. It works by exploiting how ad blockers filter script filenames — so it catches most blockers that follow standard filter lists.
No. The total JavaScript payload is under 2 KB (two tiny files), loaded asynchronously. It makes zero external HTTP requests. Your PageSpeed score won't budge.
Yes. The plugin doesn't collect, store, or transmit any user data. It doesn't set cookies, fingerprint browsers, or phone home. It's pure client-side CSS class toggling.
Append ?tsad_debug=1 to any page on your site. A debug panel will appear at the bottom showing detection status in real-time. You can also find this link on the plugin's admin page.
Absolutely. Just add the CSS class in your page builder's "Advanced" → "CSS Classes" field. Works with Gutenberg, Elementor, Divi, WPBakery, Beaver Builder, and any builder that supports custom CSS classes.
The detection relies on ad blockers blocking scripts with "ad-like" filenames (like showads.js). Very aggressive blockers or custom filter lists will definitely get caught. Very minimal or niche blockers might slip through — but those cover a tiny fraction of users.
The plugin uses display: none and display: initial by default. You can override this in your own CSS by targeting .show-only-when-adblock and .hide-only-when-adblock with higher specificity.