blocker-detector-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Description

Detect and display alert when ad block is enabled on a page (typescript implementation)

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

Readme

Keywords

none

Package Sidebar

Install

npm i blocker-detector-ts

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

9.2 kB

Total Files

12

Last publish

Collaborators

  • weban