0.1.0 • Published 5 months ago

adblock-cry-cry v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

!WARNING

This project is under active development!

AdBlock CryCry

A simple JavaScript library to detect if a user has an AdBlocker installed in their browser.

Usage

import AdBlockCryCry from "adblockcrycry";

const detector = new AdBlockCryCry();

detector.init(async () => {
  const isAdblock = await detector.detect();
  if (isAdblock) {
    console.log("AD Blocker detected!");
    // Take appropriate action
  } else {
    console.log("No AD Blocker detected!");
  }
});

API Reference

new AdBlockCryCry(options)

Creates an instance of the AdBlockCryCry detector.

ParameterTypeDefaultDescription
imgstring"/ads.jpg"Path to a dummy ad image used for detection
elementIdsArray<string>[]Additional ad-related element IDs to check
gtmIdstring""Google Tag Manager container ID used for detecting GTM blocking
isCheckFacebookbooleantrueCheckout Facebook Pixel source status

License

MIT

0.1.0

5 months ago