Greasy Fork is available in English.
实在受不了!于11月30日!支持百度贴吧、QQ、网易、微博、搜狐等待去背景灰色!
当前为
// ==UserScript== // @name 去掉网站灰色背景!!! // @namespace http://tampermonkey.net/ // @version 0.2 // @description 实在受不了!于11月30日!支持百度贴吧、QQ、网易、微博、搜狐等待去背景灰色! // @author imzhi <[email protected]> // @match https://tieba.baidu.com/* // @match https://www.qq.com/* // @match https://www.163.com/* // @match https://www.sohu.com/* // @match https://www.sina.com.cn/* // @match https://weibo.com/* // @match https://www.toutiao.com/* // @license MIT // @grant GM_addStyle // @run-at document-end // ==/UserScript== (function() { 'use strict'; GM_addStyle('@charset utf-8; ._imzhi_remove_gray_bg { filter: none !important; }'); addClass(document.querySelector('html'), '_imzhi_remove_gray_bg'); if (location.host === 'www.qq.com') { addClass(document.querySelector('body'), '_imzhi_remove_gray_bg'); } if (location.host === 'weibo.com') { addClass(document.querySelector('.grayTheme'), '_imzhi_remove_gray_bg'); } if (location.host === 'www.sina.com.cn') { GM_addStyle('@charset utf-8; body * { filter: none !important; }'); } function removeClass(ele,cName) { var arr1 = ele.className.split(' '); var arr2 = cName.split(" "); for(var i=0;i<arr2.length;i++)for(var j=arr1.length-1;j>=0;j--)(arr2[i]===arr1[j])&&arr1.splice(j,1) ele.className = arr1.join(" ") } function addClass(ele,cName) { var arr = ele.className.split(' ').concat(cName.split(" ")); for(var i=0;i<arr.length;i++){ for(var k=arr.length-1;k>i;k--){ (arr[k]==="")&&arr.splice(k,1); (arr[i]===arr[k])&&arr.splice(k,1); } } ele.className = arr.join(" "); } })();