您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动隐藏bilibili视频内内嵌三连窗口
当前为
// ==UserScript== // @name 自动隐藏b站视频内内嵌三连窗口 // @namespace kuubee // @version 0.1.1 // @description 自动隐藏bilibili视频内内嵌三连窗口 // @author kuubee // @include *://www.bilibili.com/video/av* // @include *://www.bilibili.com/video/BV* // @run-at document-body // @grant none // ==/UserScript== (function () { "use strict"; window.onload = () => { const timer = setInterval(() => { main(); }, 100); function main() { // 视频根 const watchRootDom = document.querySelector("#bilibili-player"); // 弹出层 const watchPopupDom = document.querySelector( ".bilibili-player-video-popup" ); if (!watchRootDom || !watchPopupDom) return; if (timer) clearInterval(timer); const rootObs = new MutationObserver(rootCallback); const popupObs = new MutationObserver(popupCallback); function startRootObs() { rootObs.observe(watchRootDom, { childList: true, attributes: false, subtree: false }); } function startPopupObs(target = watchPopupDom) { popupObs.observe(target, { childList: true, attributes: true, subtree: true }); } function restartPopupObs() { const watchPopupDom = document.querySelector( ".bilibili-player-video-popup" ); if (!watchPopupDom) { setTimeout(() => { restartPopupObs(); }, 100); } startPopupObs(watchPopupDom); } function rootCallback() { // 每当视频根切换时 // 重启弹出层监听 popupObs.disconnect(); restartPopupObs(); } function popupCallback(mutations, _observer) { if (!mutations[0]) return; const targetDom = mutations[0].target; targetDom.style.display = "none"; } startRootObs(); startPopupObs(); console.log("注入成功"); } }; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址