Advanced detection and prevention of DevTools usage for web applications. Supports Vanilla JS, React, and Vue.
npm install @evelocore/anti-devtools
# or
yarn add @evelocore/anti-devtools
# or
pnpm add @evelocore/anti-devtools<script type="module">
import { AntiDevtools } from 'https://cdn.jsdelivr.net/npm/@evelocore/anti-devtools/dist/index.mjs';
const anti = new AntiDevtools({
ondevtoolopen: () => {
alert('DevTools detected!');
window.location.href = "about:blank";
},
interval: 500
});
</script>import { AntiDevtools } from '@evelocore/anti-devtools';
const anti = new AntiDevtools({
ondevtoolopen: () => {
console.log('DevTools opened!');
// Redirect or clear content
window.location.href = "about:blank";
},
ondevtoolclose: () => {
console.log('DevTools closed');
},
interval: 500 // check interval in ms
});
// To stop detection
// anti.destroy();import { useAntiDevtools } from '@evelocore/anti-devtools/react';
function App() {
useAntiDevtools({
ondevtoolopen: () => {
alert('DevTools detected!');
}
});
return (
<div>
<h1>Protected App</h1>
</div>
);
}<script setup>
import { useAntiDevtools } from '@evelocore/anti-devtools/vue';
useAntiDevtools({
ondevtoolopen: () => {
alert('DevTools detected!');
}
});
</script>
<template>
<h1>Protected App</h1>
</template>| Option | Type | Default | Description |
| Params | Type | Default | Description |
|---|---|---|---|
ondevtoolopen |
() => void |
window.location.href = "about:blank" |
Callback when DevTools is detected opening. |
ondevtoolclose |
() => void |
undefined |
Callback when DevTools is detected closing. |
interval |
number |
500 |
Detection check interval in milliseconds. |
clearIntervalWhenDevOpenTrigger |
boolean |
false |
Stop checking after first detection. |
ISC