您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
移除页面的灰色模式 (恢复页面的彩色模式). Remove grayscale of html page (Restore color mode of html page).
当前为
// ==UserScript==
// @name Anti-Grayscale
// @description 移除页面的灰色模式 (恢复页面的彩色模式). Remove grayscale of html page (Restore color mode of html page).
// @version 1.0
// @author xcanwin
// @namespace https://github.com/xcanwin/Anti-Grayscale/
// @supportURL https://github.com/xcanwin/Anti-Grayscale/
// @license AGPL-3.0-only
// @updateURL https://raw.githubusercontent.com/xcanwin/Anti-Grayscale/main/Anti-Grayscale.user.js
// @downloadURL https://raw.githubusercontent.com/xcanwin/Anti-Grayscale/main/Anti-Grayscale.user.js
// @run-at document-end
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
let main = function(){
Array.prototype.forEach.call(document.getElementsByTagName("*"), function(el) {
[
"filter", "-webkit-filter", "-moz-filter", "-ms-filter", "-o-filter",
].forEach(xcanwin => {
let re = /grayscale\(.*?\)/gi;
let style = document.defaultView.getComputedStyle(el, null)[xcanwin];
if (style && style.match(re)) {
el.style.setProperty(xcanwin, style.replace(re, "grayscale(0)"), "important");
}
});
});
};
main();
})();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址