Typecho 禁止F12审查元素拿走代码

发布时间:2021-04-01

直接放在主题的footer.php最下方

<script>
function fuckyou(){
window.close(); //关闭当前窗口(防抽)
window.location="about:blank"; //将当前窗口跳转置空白页
}

function click(e) {
if (document.all) {
if (event.button==2||event.button==3) { 
alert("禁止拿代码");
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
fuckyou();
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.onkeypress=function(){ 
if(window.event.keyCode == 123) { 
fuckyou();
window.event.returnValue=false;
return(false); 
} 
}
</script>

打赏


哇 你要支持我吗?太慷慨了!谢谢
上一篇
下一篇