您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto Expand Live Chat Replay, 自动展开直播聊天回放
当前为
// ==UserScript== // @name Auto Expand Live Chat Replay // @namespace http://tampermonkey.net/ // @version 2024-01-20 // @description Auto Expand Live Chat Replay, 自动展开直播聊天回放 // @author Martin______X // @match https://*.youtube.com/watch* // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com // @grant none // @license MIT // ==/UserScript== async function liveChatExpand(expandObj) { expandObj.click(); } const liveChatExpandInterval = setInterval(() => { var expandObj = document.getElementsByClassName("yt-spec-button-shape-next"); for(var i=0; i<expandObj.length;i++){ if(expandObj[i].getAttribute("aria-label")=="Hide chat replay"){ stopLiveChatExpandInterval(); } if(expandObj[i].getAttribute("aria-label")=="Show chat replay"){ liveChatExpand(expandObj[i]); // stopLiveChatExpandInterval(); } } }, 100); function stopLiveChatExpandInterval(){ clearInterval(liveChatExpandInterval); console.warn("stopLiveChatExpandInterval"); }