您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
turn your bilibili (web page) to dark mode
当前为
// ==UserScript== // @name bilibili dark mode // @namespace none // @version 0.1 // @description turn your bilibili (web page) to dark mode // @author WhiteNightAWA // @license MIT // @match https://www.bilibili.com/* // @match https://live.bilibili.com/* // @match https://space.bilibili.com/* // @match https://search.bilibili.com/* // @icon https://icons-for-free.com/iconfiles/png/512/bilibili-1324440130309119028.png // @grant none // ==/UserScript== function addStyle (cssStr) { var D = document; var newNode = D.createElement ('style'); newNode.textContent = cssStr; var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement; targ.appendChild (newNode); } const url = location.href; console.log(url); if (url.startsWith("https://www.bilibili.com/video/")) { console.log("this is a video page"); addStyle ( ` html { filter: invert(100%) hue-rotate(180deg); } .bilibili-player-video-wrap, video, img { filter: invert(100%) hue-rotate(180deg); } ` ); } else if (url.startsWith("https://www.bilibili.com")) { console.log("this is the main page"); addStyle(` html { filter: invert(100%) hue-rotate(180deg); } img, video, em, .mask { filter: invert(100%) hue-rotate(180deg); } `); } else if (url.startsWith("https://live.bilibili.com/")) { console.log("this is a live page"); addStyle ( ` html { filter: invert(100%) hue-rotate(180deg); } img, video, em, .img-content, .user-avatar, .mask, .item-wrapper, .emoticons-panel, .top3-face, .guard-ent { filter: invert(100%) hue-rotate(180deg); } ` ); } else if (url.startsWith("https://space.bilibili.com/")) { console.log("this is a space page"); addStyle(` html { filter: invert(100%) hue-rotate(180deg); } .bilibili-player-video-wrap, video, img, .h-inner, .preview-bg, .fake-danmu, .preview-wrapper, .bili-avatar { filter: invert(100%) hue-rotate(180deg); } `); } else if (url.startsWith("https://search.bilibili.com/")) { console.log("this is a search page"); addStyle(` html { filter: invert(100%) hue-rotate(180deg); } img, video, em, .img-content, .user-avatar, .mask, .item-wrapper, .emoticons-panel, .top3-face, .guard-ent, .van-framepreview { filter: invert(100%) hue-rotate(180deg); } `) } else { console.log("wtf???"); };
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址