blueberryapps / Detect Adblock
Get information about whether the user has enabled AdBlock
Stars: ✭ 25
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Detect Adblock
Blacklist
Curated and well-maintained hostfile to block ads, tracking, cryptomining, and more! Updated regularly. ⚡🔒
Stars: ✭ 492 (+1868%)
Mutual labels: adblock
Blockadblock
Allows you to detect the extension AdBlock (and other)
Stars: ✭ 543 (+2072%)
Mutual labels: adblock
Filterlists
🛡 The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.
Stars: ✭ 653 (+2512%)
Mutual labels: adblock
Alleblock
Zestaw reguł do popularnych wtyczek blokujących reklamy, obsługujących składnię Adblock. Usuwa zbędne elementy serwisów Allegro, Ceneo, eBay, OLX i Sprzedajemy, nie ograniczając ich funkcjonalności.
Stars: ✭ 19 (-24%)
Mutual labels: adblock
Blazy
Blazy is a modern login bruteforcer which also tests for CSRF, Clickjacking, Cloudflare and WAF .
Stars: ✭ 637 (+2448%)
Mutual labels: detector
Clash Rules
🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 客户端。
Stars: ✭ 706 (+2724%)
Mutual labels: adblock
Web Launch App
🔥 launch app from web page(调起app、调用端能力、下载app、环境判断、复制)
Stars: ✭ 598 (+2292%)
Mutual labels: detector
Rules
Clash / Loon / QuantumultX / Shadowrocket / Surge去广告规则
Stars: ✭ 662 (+2548%)
Mutual labels: adblock
Blocky
Fast and lightweight DNS proxy as ad-blocker for local network with many features
Stars: ✭ 523 (+1992%)
Mutual labels: adblock
Hblock
Improve your security and privacy by blocking ads, tracking and malware domains.
Stars: ✭ 724 (+2796%)
Mutual labels: adblock
Polish Ads Filter
CertyficateIT - Oficjalne polskie filtry do Adblock, uBlock Origin, Adguard
Stars: ✭ 462 (+1748%)
Mutual labels: adblock
Detect AdBlock
yarn add detect-adblock
DetectAdbblock is a library which recognizes using of ad blocker in a browser. You can use it in case you want to show advertisment towards users or just run important script which are beign blocked.
Motivation
This library is inspired by BlockAdBlock project. Main changes are that this library is simplified, completely written in ES6 and contains tests written in Jest.
How to use
To use Detect AdBlock you need just to import DetectAdblock
class to your project and then use it as a standard javascript class.
Constructor
-
timeout
specifies number ofms
to run check for, default is 1000. -
enabledHandler
is a callback which is called when no ad block is recognized. -
disabledHandler
is a callback which is called when no ad block is not recognized.
Methods
-
startChecking(count)
is a method which starts checking for ad blockers. Count is the number of checks in one run. Default is 5.
Example
import DetectAdblock from '@blueberry/detect-adblock'
const onEnabled = () => console.log('ENABLED');
const onDisabled = () => console.log('DISABLED');
const check = () => {
// It is important to check wheter the script is rendered in the browser.
if (!process.env.IS_BROWSER) return;
const detector = new DetectAdblock(500, onEnabled, onDisabled);
detector.startChecking(3);
return;
};
Browser compatibility
The package should work in all modern browsers including IE8+.
Made with love by
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].