黑白网页恢复彩色

黑白网页恢复彩色,匹配所有网页,即装即用。

Fra 01.12.2022. Se den seneste versjonen.

// ==UserScript==
// @name         黑白网页恢复彩色
// @namespace    http://tampermonkey.net/
// @version      1.2
// @license      MIT
// @description  黑白网页恢复彩色,匹配所有网页,即装即用。
// @author       https://greasyfork.org/users/574395-frammolz-amanda
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    var filter = document.createElement('style');
    filter.type = 'text/css';
    document.getElementsByTagName('head')[0].appendChild(filter);
    filter.appendChild(document.createTextNode("*{-webkit-filter:none!important;}"));
    var windowUrl = window.location.href;
    var baidudesk = /https:\/\/www.baidu.com/;
    if( windowUrl.match(baidudesk)){
        document.getElementById("s_lg_img").setAttribute("src","https://www.baidu.com/img/flexible/logo/pc/index.png");
        document.getElementById("su").style.setProperty("background-color","#4e6ef2","important");
    }
})();