Last active
December 3, 2022 06:43
-
-
Save genffy/7e41ae1cbd725c4d9d3e6c4b1722a914 to your computer and use it in GitHub Desktop.
remove-gray PR wellcome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name remove-gray | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description remove gray theme | |
// @author You | |
// @match *://*/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net | |
// @grant GM_addStyle | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
const html = document.querySelector('html'); | |
const body = document.querySelector('body'); | |
const grayReg = /gray/gi; | |
// https://weibo.com/ | |
html.className = html.className.replace(grayReg, ''); | |
// https://www.douban.com/ | |
body.className = body.className.replace(grayReg, ''); | |
// https://www.jin10.com/ | |
// https://www.toutiao.com/ | |
html.style = "filter: grayscale(0)!important;"; | |
// https://www.sina.com.cn/ | |
GM_addStyle(`body * { | |
-webkit-filter: grayscale(0)!important; | |
-moz-filter: grayscale(0)!important; | |
-ms-filter: grayscale(0)!important; | |
-o-filter: grayscale(0)!important; | |
filter: grayscale(0)!important; | |
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=0)!important; | |
filter: none!important; | |
}`) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment