plugin-icon

Tiny Simple AdBlock Detector

作者:MythThrazz·
Detect ad blockers in 2 KB. Show or hide any content depending on whether your visitor uses an ad blocker — zero config, no external requests, no perf …
版本
1.2.0
活跃安装
10
最后更新
Mar 30, 2026
Tiny Simple AdBlock Detector

Over 40% of internet users run an ad blocker. Tiny Simple AdBlock Detector gives you the power to respond — politely ask visitors to whitelist your site, gate premium content, or simply track awareness — all without touching a line of JavaScript yourself.

How it works

The plugin loads a tiny decoy script with a filename that ad blockers love to block. When the script gets blocked, a lightweight CSS class swap kicks in — revealing or hiding any element you’ve marked up. That’s it. No jQuery, no external services, no tracking pixels, no cookie banners.

Two CSS classes. Infinite possibilities.

  • 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.

Add them to any HTML element: a <div>, a Gutenberg block, an Elementor section, a WooCommerce notice — anything.

Real-world examples

  • “Please whitelist us” — Show a polite banner only to ad-blocking visitors
  • Content gating — Hide exclusive articles or downloads from users blocking your ads
  • Alternative monetization — Show a “Support us on Patreon” box only when ads are blocked
  • Analytics — Pair with your analytics tool to track ad-blocker adoption rates on your site

Why this plugin?

  • Zero configuration — Activate it and it works. No settings page, no wizard, no API key.
  • Ridiculously lightweight — Under 2 KB of JavaScript. Your visitors won’t notice.
  • No external requests — Nothing leaves your server. Fully GDPR-friendly.
  • Works with all major ad blockers — uBlock Origin, AdBlock Plus, AdBlock, AdGuard, Brave Shield, Opera built-in blocker.
  • Page builder compatible — Works with Gutenberg, Elementor, Divi, WPBakery, Beaver Builder — anything that lets you add a CSS class.
  • Built-in debug mode — Append ?tsad_debug=1 to any URL to see live detection results.
  • Translation-ready — Includes Polish translation. PRs welcome for others.

From the maker of WP Multi Tool

This plugin is built by the same developer behind WP Multi Tool — the Swiss Army knife for WordPress developers and site administrators. If you manage multiple WordPress sites, check it out.

免费基于付费套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 7.0
这个插件是可用的下载,适用于您的站点。