您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Highlights a username in the chat in yellow 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 - Light mode // @namespace https://greasyfork.org/users/1188705 // @version 1.0 // @description Highlights a username in the chat in yellow 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="yellow",b.add(d))}})})})).observe(document.body,{childList:!0,subtree:!0})})();