您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically clicks the BTC tree when ready and returns to home after harvest
// ==UserScript== // @name Knolix Auto BTC Tree Collector (FIXED) // @namespace http://tampermonkey.net/ // @version 2.0 // @author Rubystance // @description Automatically clicks the BTC tree when ready and returns to home after harvest // @match https://knolix.com/* // @license MIT // @grant none // ==/UserScript== (function () { 'use strict'; const TOTAL_BITCOINS = 60; const CHECK_INTERVAL = 60000; function allBitcoinsReady() { for (let i = 0; i < TOTAL_BITCOINS; i++) { const el = document.getElementById(`bitcoin${i}`); if (!el || el.style.width !== '60px' || el.style.height !== '60px') { return false; } } return true; } function tryClickTree() { const tree = document.getElementById('btctree'); if (tree && allBitcoinsReady()) { console.log("[Knolix] All bitcoins are fully grown. Clicking the tree..."); tree.click(); } else { console.log("[Knolix] Bitcoins are not fully grown yet."); } } function clickReturnHome() { const homeBtn = document.querySelector('a.navlink.w-nav-link[href="/"]'); if (homeBtn) { console.log("[Knolix] Returning to home page..."); homeBtn.click(); } else { console.log("[Knolix] Home button not found."); } } function isHomePage() { return window.location.pathname === "/"; } function isHarvestPage() { return window.location.pathname.startsWith("/harvest.php"); } setInterval(() => { if (isHomePage()) { tryClickTree(); } }, CHECK_INTERVAL); if (isHarvestPage()) { console.log("[Knolix] Harvest page detected. Waiting 3 seconds before returning..."); setTimeout(clickReturnHome, 3000); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址