UNPKG

@hs-web-team/adblocker-detect

Version:
17 lines (16 loc) 681 B
/** * It does a HEAD call (as we don't need the response) to a commonly blocked domain by AdBlockers, * if the call fails it means that the user as an AdBlocker * @returns True if AdBlocker is detected, false otherwise */ export declare const probeAdDomain: () => Promise<boolean>; /** * Create a bait dom element and checks if it's removed by an AdBlocker * @returns False if the element still exists, so no adBlocker exists, true if the element is gone */ export declare const useScriptBait: () => Promise<boolean>; /** * Checks the various strategies to detect an AdBlocker * @returns True if any strategy works */ export declare const detect: () => Promise<boolean>;