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: 12 months ago
JSON representation
the Ad Block Detector is help to detect ads block active or not in user browser
- Host: GitHub
- URL: https://github.com/officialrajdeepsingh/adsblock-detector
- Owner: officialrajdeepsingh
- License: mit
- Created: 2022-05-20T10:55:18.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-21T18:10:15.000Z (almost 4 years ago)
- Last Synced: 2024-04-29T20:06:57.156Z (almost 2 years ago)
- Topics: adsbloack-detector, adsblock, adsense
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/adsblock-detector
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/adsblock-detector@1.0.3/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()
```