去掉网站灰色背景!!!

实在受不了!于11月30日!支持百度贴吧、QQ、网易、微博、搜狐等待去背景灰色!

  1. // ==UserScript==
  2. // @name 去掉网站灰色背景!!!
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.7
  5. // @description 实在受不了!于11月30日!支持百度贴吧、QQ、网易、微博、搜狐等待去背景灰色!
  6. // @author imzhi <yxz_blue@126.com>
  7. // @match https://*.baidu.com/*
  8. // @match https://www.qq.com/*
  9. // @match https://www.163.com/*
  10. // @match https://www.sohu.com/*
  11. // @match https://www.sina.com.cn/*
  12. // @match https://weibo.com/*
  13. // @match https://www.toutiao.com/*
  14. // @match https://www.hao123.com/*
  15. // @match https://www.taobao.com/*
  16. // @match https://www.jd.com/*
  17. // @match https://*.1688.com/*
  18. // @match https://www.iqiyi.com/*
  19. // @match https://www.zhihu.com/*2
  20. // @match https://www.ifeng.com/*
  21. // @match http*://www.265.com/*
  22. // @match http*://www.xinhuanet.com/*
  23. // @match http*://www.people.com.cn/*
  24. // @match https://www.huanqiu.com/*
  25. // @match https://www.cctv.com/*
  26. // @match https://www.eastmoney.com/*
  27. // @match http*://www.jrj.com.cn/*
  28. // @match https://www.thepaper.cn/*
  29. // @match https://www.youku.com/**
  30. // @match https://www.4399.com/*
  31. // @match https://*.58.com/*
  32. // @match https://www.autohome.com.cn/*
  33. // @match https://www.smzdm.com/*
  34. // @match https://www.12306.cn/*
  35. // @match https://www.tuniu.com/*
  36. // @match https://www.ctrip.com/*
  37. // @match https://pixso.cn/*
  38. // @match https://www.mgtv.com/*
  39. // @match https://v.qq.com/*
  40. // @match https://tv.sohu.com/*
  41. // @match https://youku.com/*
  42. // @match https://www.youku.com/*
  43. // @match http*://video.sina.com.cn/*
  44. // @match http*://www.bilibili.com/*
  45. // @match http*://www.eastday.com/*
  46. // @match https://www.hupu.com/*
  47. // @match https://www.miguvideo.com/*
  48. // @match https://www.dongqiudi.com/*
  49. // @match https://www.zhibo8.cc/*
  50. // @match http*://sports.sina.com.cn/*
  51. // @match https://36kr.com/*
  52. // @match http*://www.pconline.com.cn/*
  53. // @match https://www.pcpop.com/*
  54. // @match https://www.huxiu.com/*
  55. // @match https://www.it168.com/*
  56. // @match https://www.onlinedown.net/*
  57. // @match http*://www.tgbus.com/*
  58. // @match http*://www.changyou.com/*
  59. // @match https://game.qq.com/*
  60. // @match http*://game.163.com/*
  61. // @match http*://www.7k7k.com/*
  62. // @match https://www.qcc.com/*
  63. // @match https://shenyang.zbj.com/*
  64. // @match https://www.chinaz.com/*
  65. // @match https://www.huaweicloud.com/*
  66. // @match https://www.xiaoe-tech.com/*
  67. // @match https://www.zhixi.com/*
  68. // @match https://www.yuque.com/*
  69. // @match https://www.teambition.com/*
  70. // @match https://worktile.com/*
  71. // @match https://www.csdn.net/*
  72. // @match https://juejin.cn/*
  73. // @match http*://www.chinaunix.net/*
  74. // @match https://www.imooc.com/*
  75. // @match https://www.icourse163.org/*
  76. // @match https://www.kdocs.cn/*
  77. // @match https://www.aliyundrive.com/*
  78. // @match https://www.processon.com/*
  79. // @match https://*.gougucms.com/*
  80. // @match https://www.oschina.net/*
  81. // @match https://www.51job.com/*
  82. // @match https://www.zhaopin.com/*
  83. // @match https://www.chinahr.com/*
  84. // @match https://www.yingjiesheng.com/*
  85. // @match https://www.cjol.com/*
  86. // @match https://*.61.com/*
  87. // @match http*://www.91wan.com/*
  88. // @match https://www.9game.cn/*
  89. // @match https://www.2144.cn/*
  90. // @match https://www.37.com/*
  91. // @match https://www.lagou.com/*
  92. // @match https://www.liepin.com/*
  93. // @match https://you.163.com/*
  94. // @match https://www.xiaomiyoupin.com/*
  95. // @match https://www.suning.com/*
  96. // @match http*://www.dangdang.com/*
  97. // @match https://www.kaola.com/*
  98. // @match https://www.vmall.com/*
  99. // @match https://www.xcar.com.cn/*
  100. // @match https://www.pcauto.com.cn/*
  101. // @match https://www.gome.com.cn/*
  102. // @match https://www.tmall.com/*
  103. // @match https://www.vip.com/*
  104. // @match https://www.hihonor.com/cn/*
  105. // @match http*://www.cheshi.com/*
  106. // @match https://cnfol.com/*
  107. // @match https://www.hexun.com/*
  108. // @match https://mail.qq.com/*
  109. // @match https://mail.10086.cn/*
  110. // @match https://*.dxy.cn/*
  111. // @match https://www.haodf.com/*
  112. // @match http*://www.39.net/*
  113. // @match https://cloud.tencent.com/*
  114. // @match https://music.163.com/*
  115. // @match https://y.qq.com/*
  116. // @match https://www.kugou.com/*
  117. // @match https://music.migu.cn/*
  118. // @match https://music.91q.com/*
  119. // @match https://book.qq.com/*
  120. // @match https://www.jjwxc.net/*
  121. // @match http*://www.kuwo.cn/*
  122. // @match https://www.readnovel.com/*
  123. // @match https://www.hongxiu.com/*
  124. // @match http*://www.zongheng.com/*
  125. // @match https://www.qidian.com/*
  126. // @match https://www.alipay.com/*
  127. // @match https://*.hujiang.com/*
  128. // @match https://*.ganji.com/*
  129. // @license MIT
  130. // @grant GM_addStyle
  131. // @run-at document-end
  132. // ==/UserScript==
  133.  
  134. (function() {
  135. 'use strict';
  136.  
  137. GM_addStyle('@charset utf-8; ._imzhi_remove_gray_bg { filter: none !important; }');
  138.  
  139. addClass(document.querySelector('html'), '_imzhi_remove_gray_bg');
  140. addClass(document.querySelector('body'), '_imzhi_remove_gray_bg');
  141.  
  142. if (location.host === 'weibo.com') {
  143. addClass(document.querySelector('.grayTheme'), '_imzhi_remove_gray_bg');
  144. }
  145.  
  146. else if (location.host === 'www.baidu.com') {
  147. addClass(document.querySelector('.skin-gray-event'), '_imzhi_remove_gray_bg');
  148. }
  149.  
  150. else if (location.host === 'www.sina.com.cn') {
  151. GM_addStyle('@charset utf-8; body * { filter: none !important; }');
  152. }
  153.  
  154. else if (location.host === 'www.iqiyi.com') {
  155. setTimeout(() => {
  156. addClass(document.querySelector('body .gray'), '_imzhi_remove_gray_bg');
  157. }, 300);
  158. }
  159.  
  160. else if (location.host === 'www.jrj.com.cn') {
  161. GM_addStyle('@charset utf-8; body * { filter: none !important; }');
  162. }
  163.  
  164. else if (location.host === 'www.thepaper.cn') {
  165. setTimeout(() => {
  166. addClass(document.querySelector('html'), '_imzhi_remove_gray_bg');
  167. }, 300);
  168. }
  169.  
  170. else if (location.host === 'www.mgtv.com') {
  171. GM_addStyle('@charset utf-8; .page-gray .g-page-channel * { filter: none !important; }');
  172. }
  173.  
  174. else if (location.host === 'v.qq.com') {
  175. setTimeout(() => {
  176. addClassAll(document.querySelectorAll('.gray-style-remembrance'), '_imzhi_remove_gray_bg');
  177. }, 600);
  178. }
  179.  
  180. else if (location.host === 'www.miguvideo.com') {
  181. addClass(document.querySelector('#sport-channel'), '_imzhi_remove_gray_bg');
  182. }
  183.  
  184. else if (location.host === 'www.dongqiudi.com') {
  185. addClass(document.querySelector('.container'), '_imzhi_remove_gray_bg');
  186. }
  187.  
  188. else if (location.host === 'www.tgbus.com') {
  189. addClass(document.querySelector('#app > .home'), '_imzhi_remove_gray_bg');
  190. }
  191.  
  192. else if (location.host === 'www.hexun.com') {
  193. GM_addStyle('@charset utf-8; div { filter: none !important; }');
  194. }
  195.  
  196. else if (location.host === 'www.cheshi.com') {
  197. setTimeout(() => {
  198. document.querySelector('html').style.filter = null;
  199. }, 300);
  200. }
  201.  
  202. else if (location.host === 'www.jjwxc.net') {
  203. GM_addStyle('@charset utf-8; body * { filter: none !important; }');
  204. }
  205.  
  206. else if (location.host === 'y.qq.com') {
  207. addClass(document.querySelector('#app'), '_imzhi_remove_gray_bg');
  208. }
  209.  
  210. else if (location.host === 'www.kugou.com') {
  211. GM_addStyle('@charset utf-8; .mainPage * { filter: none !important; }');
  212. }
  213.  
  214. else if (location.host === 'www.kuwo.cn') {
  215. GM_addStyle('@charset utf-8; .gray { filter: none !important; }');
  216. }
  217.  
  218. else if (location.host === 'music.91q.com') {
  219. GM_addStyle('@charset utf-8; #__layout div { filter: none !important; }');
  220. }
  221.  
  222. else if (location.host.match(/\.ganji\.com$/)) {
  223. setTimeout(() => {
  224. addClass(document.querySelector('.home-container'), '_imzhi_remove_gray_bg');
  225. }, 300);
  226. }
  227.  
  228. function removeClass(ele,cName) {
  229. var arr1 = ele.className.split(' ');
  230. var arr2 = cName.split(" ");
  231. 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)
  232. ele.className = arr1.join(" ")
  233. }
  234.  
  235. function addClass(ele,cName) {
  236. console.log('addClassaddClassaddClass', ele);
  237. var arr = ele.className.split(' ').concat(cName.split(" "));
  238. for(var i=0;i<arr.length;i++){
  239. for(var k=arr.length-1;k>i;k--){
  240. (arr[k]==="")&&arr.splice(k,1);
  241. (arr[i]===arr[k])&&arr.splice(k,1);
  242. }
  243. }
  244. ele.className = arr.join(" ");
  245. }
  246.  
  247. function addClassAll(ele_arr, cName) {
  248. console.log('addClassAlladdClassAlladdClassAll', ele_arr);
  249. for (let ele of ele_arr) {
  250. addClass(ele, cName);
  251. }
  252. }
  253. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址