Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/officialrajdeepsingh/adsblock-detector

the Ad Block Detector is help to detect ads block active or not in user browser
https://github.com/officialrajdeepsingh/adsblock-detector

adsbloack-detector adsblock adsense

Last synced: 14 days ago
JSON representation

the Ad Block Detector is help to detect ads block active or not in user browser

Awesome Lists containing this project

README

        

Ads Block Detector works for your website. It is very easy to step into your website. Ad Block Detector work for all browsers.

### Note:
Ads Block Detector only work for Google Adsense.

## How to use Ads Block Detector?
You can use an ads block detector with NPM and CDN.

## NPM
```javascript
import adsblock from './node_modules/adsblock-detector/dist/build.js';
or
import adsblock from 'adsblock-detector';

const ads = new adsblock()

console.log(ads.total())
console.log(ads.check() )

```

## CDN
You can copy lalest version of ads block detector CDN link: `https://unpkg.com/adsblock-detector`

#### Example 1
```html




import adsDetector from "./node_modules/adsblock-detector/dist/build.js"

const ads = new adsDetector()

console.log(ads.total())
console.log(ads.check())

```

#### Example 2

```cmd


import adsDetector from "https://unpkg.com/[email protected]/dist/build.js"


let adsBlockDetector = new adsDetector()

console.log(adsBlockDetector.total())
console.log(adsBlockDetector.check())

```

## Inbuilt functions
In the ads block detector npm package, two inbuilt functions are available.

1. total()
2. check()

## total()
Help provide the total number of ads shown on your website.

```javascript

const ads = new adsDetector()

let totalAds = ads.total()

```

## check()
The check function provides adblocker is active or not in the client or user web browser.

```javascript

const ads = new adsDetector()

let adblocker = ads.check()

```