您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
auto click theatre mode button
当前为
// ==UserScript== // @name Twitch Auto Theatre // @name:zh-TW Twitch 自動劇院模式 // @namespace http://tampermonkey.net/ // @version 1.0 // @description auto click theatre mode button // @description:zh-tw 進入頁面自動啟動劇院模式 // @author Long // @match https://www.twitch.tv/* // @icon https://www.google.com/s2/favicons?domain=twitch.tv // @grant none // ==/UserScript== (function () { "use strict"; window.onload = function() { let twitchAutoTheatreIntervalRetry = 300; const twitchAutoTheatreInterval = setInterval(function () { const isEnabled = document.querySelector('.persistent-player').classList.contains('persistent-player--theatre') if (isEnabled) { clearInterval(twitchAutoTheatreInterval); console.warn("[Twitch-Auto-Theatre] theatre-mode enabled."); } if (!twitchAutoTheatreIntervalRetry) { clearInterval(twitchAutoTheatreInterval); console.warn("[Twitch-Auto-Theatre] theatre-mode-button not found."); } const $theatreModeButton = document.querySelector('[data-a-target="player-theatre-mode-button"]') if ($theatreModeButton) { $theatreModeButton.click(); clearInterval(twitchAutoTheatreInterval); console.log("[Twitch-Auto-Theatre] theatre-mode-button clicked."); } twitchAutoTheatreIntervalRetry--; }, 500); }; })();