blocker-detector

1.1.4 • Public • Published

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>
);

Package Sidebar

Install

npm i blocker-detector

Weekly Downloads

0

Version

1.1.4

License

MIT

Unpacked Size

23.9 kB

Total Files

11

Last publish

Collaborators

  • weban