挖矿兵团(Mining Crew)-助手

自动点击升级按钮

安裝腳本?
作者推薦腳本

您可能也會喜歡 移除、精简UI、

安裝腳本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         挖矿兵团(Mining Crew)-助手
// @description  自动点击升级按钮
// @namespace    LemonNoCry
// @author       LemonNoCry
// @license      MIT
// @version      1.0.0
// @match        https://gltyx.github.io/mining-crew/*
// ==/UserScript==

(function () {
    'use strict';

    setInterval(() => {
        const panel = document.querySelector('#freeUpgradesPanel');
        if (!panel) return;

        // 在 panel 内找出所有显示的升级按钮
        const buttons = panel.querySelectorAll('.upgrade-button-outer');
        buttons.forEach(btn => {
            const style = getComputedStyle(btn);
            if (style.display !== 'none') {
                btn.click();
                console.log('自动单击升级:', btn.id);
            }
        });
    }, 1000);
})();