Twitch不在直播就自动刷新

每30秒检测是否在直播,没在直播就刷新页面

目前为 2022-07-10 提交的版本。查看 最新版本

// ==UserScript==
// @name         Twitch不在直播就自动刷新
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  每30秒检测是否在直播,没在直播就刷新页面
// @author       冰封
// @match        https://www.twitch.tv/playapex
// @icon         https://www.google.com/s2/favicons?sz=64&domain=twitch.tv
// @grant        none
// @license      GPL-3.0-only
// ==/UserScript==

(function() {
    'use strict';
    function reload(){
        window.location.reload(true);
    }
    setInterval(function () {
        if (document.getElementsByClassName("live-indicator-container").length == 0){
            reload();
        }
    }, 30*1000);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址