Also works if DevTools is undocked. Useful for when you want something to happen when DevTools is open.
👺 Demo
<script src="https://cdn.jsdelivr.net/gh/nicolauns/devtools.detect@1.2.0/devtools-detect.min.js"></script>
devtools.detect(function(status){
alert('Is DevTools open? ' + status);
});
Browser | Supported |
---|---|
Chrome | ✓ |
Firefox | ✓ |
Opera | ✓ |
Safari | ✓ |
Mobile Safari | ✓¹ |
Edge | ✓ |
IE11 | ✓ |
IE10 | ✓ |