废话不多说,直接上代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Hello World</h1>
<script>
// 方法一
// function anonymous() { debugger; }
// setInterval(() => {
// anonymous();
// }, 400);
// 方法二
function isConsoleOpen() {
var startTime = new Date();
debugger;
var endTime = new Date();
return endTime - startTime > 100;
}
setInterval(() => {
if (isConsoleOpen()) {
window.location.href = 'https://www.iotzzh.com';
}
}, 400);
// 加点控制
// if (window.location.href.indexOf('#debug') == -1) {
// setInterval(function () {
// (function (a) { return (function (a) { return (Function('Function(arguments[0]+"' + a + '")()')) })(a) })('bugger')('de', 0, 0, (0, 0));
// }, 1000)
// }
</script>
</body>
</html>
网友评论