您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
过滤掉字数长的弹幕
// ==UserScript== // @name 斗鱼弹幕过滤 // @namespace http://tampermonkey.net/ // @version 2024-03-24 // @description 过滤掉字数长的弹幕 // @author A9 // @match https://www.douyu.com/* // @run-at document-end // @noframes // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const DYWebSocket_esModule = window?.playerSDK56c64ff029f3e4d0b3e1("dcfdb"); let originalMyObject = DYWebSocket_esModule.default; let RedefineMyObject = function(...args) { originalMyObject.apply(this, args); } RedefineMyObject.prototype = Object.create(originalMyObject.prototype); RedefineMyObject.prototype.onMessageHandler = function(e,t) { //过滤掉用户进入提醒的提示\用户升级提示\用户分享直播间提示 if(e?.type==="uenter"||e?.type==="blab"||e?.type==="srres"){return;} if(e?.type==="chatmsg"){ //过滤掉大于18个字的弹幕 if(e.txt.length>18)return; } var r = this; this.worker ? t ? (this.log("onmessage", e), this.onmessage && this.onmessage.call(this, e)) : this.worker.postMessage({ cmd: "message", data: e.data, showLog: this.showLog }) : this.bufferCoder.decode(e.data, function(e) { r.log("onmessage", e), r.onmessage && r.onmessage.call(r, o.default(e)) }) } DYWebSocket_esModule.default = RedefineMyObject; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址