Greasy Fork is available in English.
自动点击 OP.GG 网站上的「录制」按钮
当前为
// ==UserScript==
// @name OP.GG Auto Recorder
// @name:zh-TW OP.GG 自動點擊錄製
// @name:zh-CN OP.GG 自动点击录制
// @namespace https://www.youtube.com/c/ScottDoha
// @version 1.1
// @description Automatically clicks "Record" 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 = Array.from(document.querySelectorAll('button')).find(button => {
return button.textContent.includes('錄制') && button.matches('.css-6qf538');
});
if (recordButton) {
recordButton.click();
}
}
// 初始運行一次,之後每2秒檢查一次是否有按鈕出現
clickButton();
setInterval(clickButton, 2000);
})();