https://github.com/c-lodder/block-adblock-webcomponent
Detect if a user is using an Ad Blocker
https://github.com/c-lodder/block-adblock-webcomponent
adblock detect javascript
Last synced: about 1 year ago
JSON representation
Detect if a user is using an Ad Blocker
- Host: GitHub
- URL: https://github.com/c-lodder/block-adblock-webcomponent
- Owner: C-Lodder
- License: mit
- Created: 2019-08-07T12:55:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-07T13:06:12.000Z (almost 7 years ago)
- Last Synced: 2025-01-29T07:30:02.705Z (over 1 year ago)
- Topics: adblock, detect, javascript
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# block-adblock-webcomponent
Detect if a user is using an Ad Blocker
Based on: https://github.com/sitexw/BlockAdBlock
# Usage
Load the `block-adblock.js` file:
```
```
Add the Custom Element anywhere on your HTML page:
```
```
By default, the element will render a red alert at the top of the web page stating that it's detected an adblocker.
You can of course customize the script in any way you like.