Twitch.tv highlights first chats from users - Dark mode

Highlights a username in the chat in blue if it's the first time they sent a message in your browser session, then adds them to a list of observed chatters and adds a mutationoberver to look for new chats.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==UserScript==
// @name        Twitch.tv highlights first chats from users - Dark mode
// @namespace   https://greasyfork.dpdns.org/users/1188705
// @version     1.0
// @description Highlights a username in the chat in blue if it's the first time they sent a message in your browser session, then adds them to a list of observed chatters and adds a mutationoberver to look for new chats.
// @author      sunmilk50
// @license     public domain
// @match       https://www.twitch.tv/*
// @grant       none
// ==/UserScript==
(function(){const b=new Set;(new MutationObserver(function(e){e.forEach(function(c){"childList"===c.type&&Array.from(c.addedNodes).forEach(a=>{if(a.classList&&a.classList.contains("chat-line__message")){const d=a.querySelector(".chat-author__display-name").innerText;b.has(d)||(a.style.backgroundColor="blue",b.add(d))}})})})).observe(document.body,{childList:!0,subtree:!0})})();
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元