delete unused inject
This commit is contained in:
16
src-tauri/src/inject/custom.js
vendored
16
src-tauri/src/inject/custom.js
vendored
@@ -1,14 +1,14 @@
|
|||||||
// --- 1. 屏蔽无限 debugger (防止控制台卡死) ---
|
// --- 1. 屏蔽无限 debugger (防止控制台卡死) ---
|
||||||
(function() {
|
// (function() {
|
||||||
var _constructor = window.Function.prototype.constructor;
|
// var _constructor = window.Function.prototype.constructor;
|
||||||
window.Function.prototype.constructor = function(str) {
|
// window.Function.prototype.constructor = function(str) {
|
||||||
if (str === 'debugger') return function() {};
|
// if (str === 'debugger') return function() {};
|
||||||
return _constructor.apply(this, arguments);
|
// return _constructor.apply(this, arguments);
|
||||||
};
|
// };
|
||||||
})();
|
// })();
|
||||||
|
|
||||||
// --- 2. 解除右键拦截 ---
|
// --- 2. 解除右键拦截 ---
|
||||||
window.addEventListener('contextmenu', (e) => e.stopPropagation(), true);
|
// window.addEventListener('contextmenu', (e) => e.stopPropagation(), true);
|
||||||
|
|
||||||
// --- 3. 自动隐藏/显示顶栏和侧边栏 (原生 JS 实现) ---
|
// --- 3. 自动隐藏/显示顶栏和侧边栏 (原生 JS 实现) ---
|
||||||
(function() {
|
(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user