(function() {
'use strict';
let consoleIsOpen = false;
const verify = () => {
var minimalUserResponseInMiliseconds = 100;
var before = new Date().getTime();
debugger;
var after = new Date().getTime();
if (after - before > minimalUserResponseInMiliseconds) { // user had to resume the script manually via opened dev tools
consoleIsOpen = true;
}
if (consoleIsOpen === true) {
window.dispatchEvent(new Event('devtools-opened'));
}
consoleIsOpen = false;
setTimeout(verify, 1000);
}
verify();
})();