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 (防止控制台卡死) ---
|
||||
(function() {
|
||||
var _constructor = window.Function.prototype.constructor;
|
||||
window.Function.prototype.constructor = function(str) {
|
||||
if (str === 'debugger') return function() {};
|
||||
return _constructor.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
// (function() {
|
||||
// var _constructor = window.Function.prototype.constructor;
|
||||
// window.Function.prototype.constructor = function(str) {
|
||||
// if (str === 'debugger') return function() {};
|
||||
// return _constructor.apply(this, arguments);
|
||||
// };
|
||||
// })();
|
||||
|
||||
// --- 2. 解除右键拦截 ---
|
||||
window.addEventListener('contextmenu', (e) => e.stopPropagation(), true);
|
||||
// window.addEventListener('contextmenu', (e) => e.stopPropagation(), true);
|
||||
|
||||
// --- 3. 自动隐藏/显示顶栏和侧边栏 (原生 JS 实现) ---
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user