您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
通过 “/” 键控制弹幕开关,也可通过更改 ”danmu“ 变量 来修改热键
当前为
// ==UserScript== // @name BiliBili 一键开关 弹幕 danmu v0.3 // @namespace http://tampermonkey.net/ // @version v0.5 // @description 通过 “/” 键控制弹幕开关,也可通过更改 ”danmu“ 变量 来修改热键 // @author Ben // @match *://*.bilibili.com/* // @grant none // @require https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js // @license MIT // ==/UserScript== // code reference : https://github.com/akiirui/userscript/blob/bilibili-danmaku-disabler/userscript.js var danMu = 191; //"/",可以自己更改 const button = ".bui-switch-input"; /* // Disable danmaku function disableDanmaku() { $(button).click(); } // Enable danmaku function enableDanmaku() { $(button).click(); } */ $(document).ready(function() { setTimeout(function(){if( $(button).is(':checked') ){ // Run disabler disableDanmaku(); } }, 4000) $(document).keydown(function(event){//listener,调用键盘编码,按了键盘回调keydown里的function(event)函数,event就是你按的那个按键的code码 switch(event.keyCode){ case danMu: $(button).click(); /* if( $(button).is(':checked') ){ // Run disabler disableDanmaku(); }else{ // Run Enabler enableDanmaku(); } */ break; } }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址