function devtoolIsOpening() {
console.clear();
let before = new Date().getTime();
debugger;
let after = new Date().getTime();
if (after - before > 200) {
document.write(" Dont open Developer Tools. ");
window.location.replace("https://example.com");
}
setTimeout(devtoolIsOpening, 100);
}
devtoolIsOpening();
Doesn't work for me with the js below