您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
移除灰色模式
- // ==UserScript==
- // @name MuteGreyTheme
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description 移除灰色模式
- // @author You
- // @match *://weibo.com/*
- // @match *://www.mgtv.com/
- // @match *://www.bilibili.com/
- // @match *://*.baidu.com/
- // @match *://v.qq.com/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=mgtv.com
- // @grant unsafeWindow
- // @grant GM_log
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- GM_log('开始啦')
- window.onload=function(){
- //腾讯视频
- if (document.querySelectorAll(".gray-style-remembrance").length > 0) {
- GM_log('更新style')
- document.querySelectorAll(".gray-style-remembrance").forEach( a => {
- a.classList.remove('gray-style-remembrance')
- })
- setTimeout(e => {
- GM_log('延迟更新style')
- document.querySelectorAll(".gray-style-remembrance").forEach( a => {
- a.classList.remove('gray-style-remembrance')
- })
- }, 1000 )
- } else
- //b站
- if(document.querySelector('html').getAttribute('class') === 'gray'){
- GM_log('B站逻辑')
- document.querySelector('html').removeAttribute('class', 'gray');
- } else
- //芒果
- if(document.querySelector('body').getAttribute('class') === 'page-gray'){
- GM_log('芒果逻辑')
- document.querySelector('body').removeAttribute('class', 'page-gray');
- } else
- //百度
- if(document.querySelector('body').getAttribute('class') === 'big-event-gray'){
- GM_log('百度逻辑')
- document.querySelector('body').removeAttribute('class', 'big-event-gray');
- } else
- //微博 一定是放最后
- if (document.querySelectorAll("style").length > 0) {
- GM_log('微博逻辑')
- document.querySelectorAll("style").forEach( a => {
- if(a.innerHTML.includes('grayTheme')){
- GM_log('更新style')
- a.innerHTML=''
- }
- })
- }
- }
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址