Skip to content

itayganor/use-adblock-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

use-adblock-detect

npm version

A simple React hook to detect AdBlock


Install

npm install use-adblock-detect

Usage

import useAdblockDetect from 'use-adblock-detect';


function Page() {
    const detected = useAdblockDetect();

    return <main>
        {detected && <h1>Please disable adblock</h1>}
    </main>;
}

The hook returns a boolean that determines whether Adblock was detected on the user's browser.

About

๐Ÿ›‘ A simple React hook to detect AdBlock

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published