您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
直播间刷屏消息Clear
当前为
// ==UserScript== // @name bilibili直播间刷屏Clear // @namespace mscststs // @version 0.4 // @description 直播间刷屏消息Clear // @author mscststs // @include /https?:\/\/live\.bilibili\.com\/\d/ // @grant none // ==/UserScript== (function() { 'use strict'; let list = window.Helper_danmaku_List = []; let threshold = 3; $("body").append(` <style> .Helper_danmaku_clear_hide{ display:none !important; } </style> `) function ListennerDanmaku(){ $("body").on("DOMNodeInserted",".chat-item.danmaku-item",function(e){ let content = $(this).find(".danmaku-content").text(); //console.log(content); if(list[content]){ list[content]+=1; }else{ list[content]=1; } setTimeout(function(){ list[content]-=1; if(list[content]===0){ delete(list[content]); } },5000); if(list[content]==threshold){ $(this).css("background-color","990"); //console.log("-1s"); } if(list[content]>threshold){ $(this).addClass("Helper_danmaku_clear_hide");//元素隐藏 //console.log("-1s"); } }); $("body").on("DOMNodeInserted",".bilibili-danmaku",function(){ let list = window.Helper_danmaku_List; let content = $(this).text(); //console.log(list[content]); if(list[content]>threshold){ $(this).addClass("Helper_danmaku_clear_hide");//元素隐藏 }else{ $(this).removeClass("Helper_danmaku_clear_hide");//元素隐藏 } }); } ListennerDanmaku(); })();