您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto-clicks Start/Confirm with toggle button showing icon + "Auto Start On/Off" with color indicator
当前为
// ==UserScript== // @name Aternos Auto Bot // @version 0.7.1 // @description Auto-clicks Start/Confirm with toggle button showing icon + "Auto Start On/Off" with color indicator // @author zuki // @match https://aternos.org/server/* // @grant none // @namespace https://gf.qytechs.cn/users/1484866 // ==/UserScript== let BotON = localStorage.getItem('aternosAutoBotON') === 'true' let IsRunning = false const observer = new MutationObserver(() => { const StartButton = document.querySelector('div#start') if (StartButton && StartButton.parentElement && !document.getElementById('autostart-toggle')) { const AutoButton = StartButton.cloneNode(true) AutoButton.id = "autostart-toggle" AutoButton.querySelector("i")?.remove() AutoButton.innerHTML = BotON ? '<i class="fa-solid fa-repeat"></i> Auto Start On' : '<i class="fa-solid fa-repeat"></i> Auto Start Off' AutoButton.style.backgroundColor = BotON ? '' : '#e3214b' AutoButton.style.transition = 'none' AutoButton.style.margin = '0' AutoButton.addEventListener("click", () => { BotON = !BotON localStorage.setItem('aternosAutoBotON', BotON) AutoButton.innerHTML = BotON ? '<i class="fa-solid fa-repeat"></i> Auto Start On' : '<i class="fa-solid fa-repeat"></i> Auto Start Off' AutoButton.style.transition = 'none' AutoButton.style.backgroundColor = BotON ? '' : '#e3214b' }) StartButton.parentElement.appendChild(AutoButton) startTheServer() } }) observer.observe(document.body, { childList: true, subtree: true }) function startTheServer() { if (BotON) { setTimeout(() => { antiBanCheckIfUnused() setTimeout(() => { if (IsRunning) { document.querySelector('div#confirm')?.click() document.querySelector('div#start')?.click() } startTheServer() }, 200) }, 900) } else { setTimeout(startTheServer, 1000) } } function antiBanCheckIfUnused() { const Online = document.getElementsByClassName('status online') const Loading = document.getElementsByClassName('status loading') const Starting = document.getElementsByClassName('status loading starting') IsRunning = !(Online.length || Loading.length || Starting.length) }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址