通过重写控制台方法禁用控制台日志记录
// ==UserScript==
// @name 控制台日志记录
// @namespace .
// @version
// @description 通过重写控制台方法禁用控制台日志记录
// @author *
// @run-at document-end
// @match *
// @grant none
// ==/UserScript==
(function() {
'use strict';
// 遍历控制台对象的所有方法
for (var method in console) {
// 检查当前属性是否是一个函数
if (typeof console[method] === 'function') {
// 如果是函数,将其重写为空函数,以禁用日志记录
console[method] = function() {};
}
}
})();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址