您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动关闭哔哩哔哩 HTML5 播放器弹幕
当前为
// ==UserScript== // @name bilibili Danmaku Disabler // @name:en-US bilibili Danmaku Disabler // @name:zh-CN bilibili 弹幕关闭 // @description Auto disable bilibili HTML5 player danmaku // @description:en-US Auto disable bilibili HTML5 player danmaku // @description:zh-CN 自动关闭哔哩哔哩 HTML5 播放器弹幕 // @namespace bilibili-danmaku-disabler // @version 2020.07.28 // @author Akatsuki // @license MIT License // @grant GM_info // @run-at document-idle // @match *://www.bilibili.com/*video/* // @match *://www.bilibili.com/bangumi/play/* // @match *://www.bilibili.com/blackboard/* // @match *://player.bilibili.com/* // ==/UserScript== 'use strict' const selectorNative = { on: "input[class='bui-switch-input']:checked", off: "input[class='bui-switch-input']:not(:checked)" } const selectorEmbed = { on: "div[class~='bilibili-player-video-btn-danmaku'][data-text='打开弹幕']", off: "div[class~='bilibili-player-video-btn-danmaku'][data-text='关闭弹幕']" } if (document.location.hostname === 'player.bilibili.com') { var selector = selectorEmbed } else { selector = selectorNative } // Danmaku disabler function disableDanmaku () { var buttonOn = document.querySelector(selector.on) if (buttonOn !== null) { buttonOn.click() } setTimeout(() => { if (document.querySelector(selector.off) === null) { disableDanmaku() } }, 500) } disableDanmaku()