近日浏览某些网站看到他们的某个地方很有创意,就想F12查看一下,结果,哎呦我去页面显示的是debug调试,审查元素或刷新页面一下,页面显示 “大佬别扒了!”,我勒个暴脾气,撸它!
代码如下:
((function() {
var callbacks = [], timeLimit = 50, open = false;
setInterval(loop, 1);
return {
addListener: function(fn) {
callbacks.push(fn);
},
cancleListenr: 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();
});