Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bharathvaj-ganesan/maari.js
A tiny and simple browser library for detecting ad blocker presence. :fire:
https://github.com/bharathvaj-ganesan/maari.js
adblock-detector hacktoberfest npm
Last synced: 2 days ago
JSON representation
A tiny and simple browser library for detecting ad blocker presence. :fire:
- Host: GitHub
- URL: https://github.com/bharathvaj-ganesan/maari.js
- Owner: bharathvaj-ganesan
- License: mit
- Created: 2018-01-05T17:20:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-23T04:30:44.000Z (about 4 years ago)
- Last Synced: 2024-10-07T08:39:17.991Z (about 1 month ago)
- Topics: adblock-detector, hacktoberfest, npm
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/maari
- Size: 921 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/bharathvaj1995/maari.js.svg?branch=master)](https://travis-ci.org/bharathvaj1995/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Built with Gulp](https://img.shields.io/badge/built%20with-gulp-red.svg)](https://gulpjs.com/)
[![Served with jsdelivr](https://img.shields.io/badge/cdn-jsdelivr-brightgreen.svg)](https://www.jsdelivr.com/)# MAARI JS
> A tiny and simple browser library for detecting ad blocker presence. If any of viewers use adblockers just say the swag "senjiruven"
![](media/maari.gif)
Note: It's famous mass dialogue from South Indian film.
## Features
* Simple and Tiny library (Less than 1KB in size)
* Zero Dependency
* Currenty Supports all modern browsers except IE
* CDN support### Getting started
```html
```
### Usage
```js
const alertUser = () => {
alert('Please turn off the ad blocker');
};maari(alertUser);
```Callback will be executed if adblock is detected.
## FAQ
### Why yet another adblock detector library?
There are many adblock detector modules on npm, unfortunately, I couldn't find any that fit my needs:
* Comprehensive test suite
* Covers all browsers atleast except IE
* Unsurprising behavior
* Well-maintained
* Modern logicThe most common problems I noticed in these modules was they are having unncessary logic, following some big list of rules. But the adblockers have become more smart and effective in blocking ads.
## License
MIT © [Bharathvaj Ganesan](https://github.com/bharathvaj1995)