disable debugging
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/430198/956324/%E7%A6%81%E6%AD%A2%E8%B0%83%E8%AF%95.js
// ==UserScript==
// @name 禁止调试
// @namespace coderWyh
// @version 0.1.0
// @description disable debugging
// @author coderWyh
// @match http://www.gczl360.com:8084/Admin/ZLKGL/Template*
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
document.onkeydown = function () {
var e = window.event || arguments[0];
//屏蔽F12
if (e.keyCode == 123) {
alert('自动设置提示:禁止调试控制台!如要调试代码,请先关闭自动设置功能!')
return false;
//屏蔽Ctrl+Shift+I
} else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
alert('自动设置提示:禁止调试控制台!如要调试代码,请先关闭自动设置功能!')
return false;
//屏蔽Shift+F10
} else if ((e.shiftKey) && (e.keyCode == 121)) {
alert('自动设置提示:禁止调试控制台!如要调试代码,请先关闭自动设置功能!')
return false;
}
};
//屏蔽右键单击
document.oncontextmenu = function () {
alert('自动设置提示:禁止调试控制台!如要调试代码,请先关闭自动设置功能!')
return false;
}
})();