OP.GG Auto Clicker

Automatically clicks "Record" or "Spectate" buttons on OP.GG website

目前為 2024-09-14 提交的版本,檢視 最新版本

// ==UserScript==
// @name         OP.GG Auto Clicker
// @name:zh-TW   OP.GG 自動點擊腳本
// @name:zh-CN   OP.GG 自动点击脚本
// @namespace    https://www.youtube.com/c/ScottDoha
// @version      1.0
// @description  Automatically clicks "Record" or "Spectate" buttons on OP.GG website
// @description:zh-TW 自動點擊 OP.GG 網站上的「錄製」或「觀看」按鈕
// @description:zh-CN 自动点击 OP.GG 网站上的「录制」或「观看」按钮
// @author       Scott
// @match        *://*.op.gg/summoners/*
// @grant        none
// @license MIT
// ==/UserScript==


(function() {
    'use strict';

    // 每60秒刷新頁面
    setInterval(function() {
        location.reload();
    }, 60000);  // 60000ms = 60s

    // 檢查是否存在錄制或觀看按鈕,並點擊
    function clickButton() {
        const recordButton = document.querySelector('button[type="button"].css-6qf538'); // 錄制按鈕
        const spectateButton = document.querySelector('button.spectate'); // 觀看按鈕

        if (recordButton) {
            recordButton.click();
        } else if (spectateButton) {
            spectateButton.click();
        }
    }

    // 初始運行一次,之後每2秒檢查一次是否有按鈕出現
    clickButton();
    setInterval(clickButton, 2000);
})();

QingJ © 2025

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