您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Filter youtube live comments
当前为
// ==UserScript== // @name Youtube live comments regex filter // @namespace http://tampermonkey.net/ // @version 0.1 // @description Filter youtube live comments // @author You // @include https://www.youtube.com/* // @icon https://www.google.com/s2/favicons?domain=youtube.com // @grant none // @require http://code.jquery.com/jquery-3.4.1.min.js // ==/UserScript== (function() { 'use strict'; var reg = /^.*([一-龠]+|[ぁ-ゔ]+|[ァ-ヴー]+|[々〆〤]+).*$/u; $('yt-live-chat-app').find('YT-LIVE-CHAT-TEXT-MESSAGE-RENDERER').each(function(e){ var target = $(e.target); target.find('#message').each(function(ee){ var text = $(this).text(); if(reg.test(text)){ target.hide(); } }); }); $('yt-live-chat-app').bind("DOMSubtreeModified", function(e) { var target = $(e.target); if(target.prop("tagName") === 'YT-LIVE-CHAT-TEXT-MESSAGE-RENDERER'){ target.find('#message').bind("DOMSubtreeModified", function(ee) { var text = $(this).text(); if(reg.test(text)){ target.hide(); } }); } }); })();