您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
关闭哔哩哔哩弹幕,默认开启字幕太烦了
// ==UserScript== // @name 默认关闭哔哩哔哩弹幕 // @namespace https://gf.qytechs.cn/zh-CN/users/4330 // @version 2.0 // @description 关闭哔哩哔哩弹幕,默认开启字幕太烦了 // @author x2009again // @match http*://www.bilibili.com/* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; var autochangurl=0; var maxcount=30; function closedanmuku(count) { window.timer = setInterval(function() { var divfordanmakuswitch=document.querySelector(".bilibili-player-video-danmaku-switch"); if(divfordanmakuswitch!=null) { var inputdanmaku= divfordanmakuswitch.firstChild; if (inputdanmaku!=null&&inputdanmaku.click!=null){ if(autochangurl==1) { autochangurl=0; clearInterval(window.timer); } else { inputdanmaku.click(); clearInterval(window.timer); } } else if(count<maxcount) { count++; } else { clearInterval(window.timer); } } else if(count<maxcount) { count++; } else { clearInterval(window.timer); } }, 100); } closedanmuku(0,0); var _wr = function(type) { var orig = history[type]; return function() { var rv = orig.apply(this, arguments); var e = new Event(type); e.arguments = arguments; if(e.explicitOriginalTarget==null) { autochangurl=1; } window.dispatchEvent(e); return rv; }; }; history.pushState = _wr('pushState'); history.replaceState = _wr('replaceState'); window.addEventListener('replaceState', function(e) { window.timer&&clearInterval(window.timer); closedanmuku(0); }); window.addEventListener('pushState', function(e) { window.timer&&clearInterval(window.timer); closedanmuku(0); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址