JS監(jiān)聽F12+審核元素代碼,如果為真就彈窗,然后刪除掉所有代碼,讓扒站者無從下手。
((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('CNM溫馨提醒:\n小樣!還想扒我的站?\n自己老實(shí)一點(diǎn)!'); document.body.innerHTML = ""; } else { open = false; } } })()).addListener(function() { window.location.reload(); }); // js鍵盤監(jiān)聽事件-監(jiān)聽鍵盤F12(123)-觸發(fā)文件為空 $(document).keydown(function(event) { if (event.keyCode == 123) { alert('CNM溫馨提醒:\n小伙子!你想干嘛?又想扒我站?'); document.body.innerHTML = ""; } }); //顯示版權(quán) console.log("\n %c CNM.SB %c https://cnm.sb/ \n\n", "color: #fadfa3; background: #2f55d4; padding:5px 0;", "background: #fadfa3; padding: 5px 0;")