Skip to content

weban-pl/blocker-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Detect and display alert when ad block is enabled on a page

Install

npm install blocker-detector
yarn add blocker-detector

Usage

  • You can get blocking status
import { BlockerDetector } from 'blocker-detector';

const App = () => {
  let blocked = BlockerDetector();

  return (
    <>
      {blocked &&
        <span>Display when ad block has been detected</span>
      }
    </>
  );
};
  • You can simple display alert
import { BlockerAlert } from 'blocker-detector';

const App = () => (
  <BlockerAlert>
    <span>Display when ad block has been detected</span>
  </BlockerAlert>
);

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published