自动关闭bilibili弹幕

try to take over the world!

// ==UserScript==
// @name         自动关闭bilibili弹幕
// @namespace    http://tampermonkey.net/
// @version      0.1.2
// @description  try to take over the world!
// @author       luofo
// @match        *://www.bilibili.com/video/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    let selector_native = {
        'on':"input[class='bui-switch-input']:checked"
    }
    function switch_danmaku() {
        tim()
    }
    function tim() {
        if(document.querySelector(selector_native.on)){
            document.querySelector(selector_native.on).click();
        }
        else {
            setTimeout(tim, 1000)
        }
    }
    switch_danmaku()
    // Your code here...
})();

QingJ © 2025

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