1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| script. ((function () { var callbacks = [], timeLimit = 50, open = false; setInterval(loop, 1); return { addListener: function (fn) { callbacks.push(fn); }, cancelListener: function (fn) { callbacks = callbacks.filter(function (v) { return v !== fn; }); } }
function loop() { var startTime = new Date(); debugger; if (new Date() - startTime > timeLimit) { if (!open) { callbacks.forEach(function (fn) { fn.call(null); }); } open = true; window.stop(); alert('你真坏,请关闭控制台!'); document.body.innerHTML = ""; } else { open = false; } } })()).addListener(function () { window.location.reload(); }); script. function toDevtools() { let num = 0; let devtools = new Date(); devtools.toString = function () { num++; if (num > 1) { alert('你真坏,请关闭控制台!') window.location.href = "about:blank" blast(); } } console.log('', devtools); } toDevtools();
|