Greasy Fork

Greasy Fork is available in English.

关闭 bilibili 弹幕并且隐藏设置按钮

如果你需要的话 :P

当前为 2019-06-02 提交的版本,查看 最新版本

// ==UserScript==
// @name         关闭 bilibili 弹幕并且隐藏设置按钮
// @namespace    https://github.com/bayeszou
// @version      0.1
// @description  如果你需要的话 :P
// @author       You
// @match        https://*.bilibili.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    console.log('你看不了弹幕啦')
    // Your code here...
    var timer = setInterval(function(){
        var btnEl = document.querySelector('.bui-switch .bui-checkbox')
        if(!btnEl) return
        if(btnEl.value === 'on') btnEl.click()
        document.querySelector('.bilibili-player-video-danmaku-root').style.display = 'none'
        clearInterval(timer)
    },500)
})();