uupaa.devtoolsdetector.js
v0.8.11
Published
Detect devtools.
Downloads
4
Readme
========= DevToolsDetector.js
Detect DevTools.
Document
How to use
<script src="lib/Spec.js">
<script src="lib/UserAgent.js">
<script src="lib/DevToolsDetector.js">
<script>
var spec = UserAgent(Spec());
var lastState = null; // true is detected
function _proceed() {
DevToolsDetector(spec, function(err, yes) {
var currentState = yes ? true : false;
if (lastState !== currentState) {
document.body.style.backgroundColor = currentState ? "yellow" : "blue";
lastState = currentState;
}
setTimeout(_proceed, 2 * 1000);
});
}
_proceed();
</script>