FuckAdBlock
lastmod 2026-11-10created 2024-01-314 edits
FuckAdBlock is a JavaScript library that detects whether a visitor is using an ad-blocking extension such as AdBlock. It works by inserting a dummy element that looks like an ad into the page and checking whether it gets blocked and disappears or shrinks to zero size, and callbacks can be registered to run depending on the detection result. Sites that rely on AdSense revenue use it to show a notice to users who block ads or to restrict access to content, but the cat-and-mouse game continues as blocking filters in turn add rules that block this script.
Detects ad blockers (AdBlock, ...)