Master File Random AM Button Clicker

Clicks a button at random intervals

目前为 2024-05-09 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/494463/1373518/Master%20File%20Random%20AM%20Button%20Clicker.js

// ==UserScript==
// @name         Master File Random AM Button Clicker
// @namespace    https://gf.qytechs.cn/master-file-random-Am-button-clicker
// @version      3.0
// @description  Clicks a button at random intervals
// @license      MIT
// @match        https://*.apple.com/*
// @grant        none
// @downloadURL https://update.gf.qytechs.cn/
// @updateURL https://update.gf.qytechs.cn/
// ==/UserScript==

function getRandomInt(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min) + min);
}

function doSomething() {
    // Find the "Next" button using its class
    var nextButton = document.querySelector('amp-playback-controls-item-skip.next');
    if (nextButton) {
        nextButton.click();
    } else {
        console.log("Next button not found.");
    }
}

(function loop() {
    var rand = getRandomInt(35000, 45000);
    console.log(rand);
    setTimeout(function() {
        doSomething();
        loop();
    }, rand);
})();

QingJ © 2025

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