README
devtools-detect
Utility to check if DevTools.
- Chrome DevTools
- Safari DevTools
- Firefox DevTools
- Opera DevTools
- Firebug
- Firebug Lite
How to use
import { isDevtoolsOpen } from '@bretkikehara/devtools-detect';
if (isDevtoolsOpen(window)) {
console.log('devtools is open!');
} else {
console.log('devtools is closed!');
}
isDevtoolsOpen(window: Window, threshold: number = 160)
- window - Window variable to check.
- threshold - Screen dimension inner vs outer threshold.
Caveats
Firefox can't detect if devtools is open as an external window.
License
MIT © Bret K. Ikehara
"