react-adblock-detector
Description
Provides you with react hook to detect is an adblocker is enabled.
Example
import './App.css';
import React from 'react';
import { useAdblockDetector } from 'react-adblock-detector';
function App() {
const [isAdblockCheckComplete, isAdblockerDetected] = useAdblockDetector();
return (
<div className="App">
<header className="App-header">
{
isAdblockCheckComplete ? (
isAdblockerDetected ? "We detected an adblocker" : "No adblocker detected"
) : "Checking for adblocker..."
}
</header>
</div>
);
}
export default App;
Last known good
[email protected] has been verified to work on the following browsers with version:
Version | |
---|---|
Chrome | 88.0.4324 |
Firefox | 85.0.0 |
Chromium Edge | 88.0.705 |
Safari | 14.0.2 |