Knolix Auto Tree Click and Home Click Loop

Click on the bitcoin tree every 20 minutes and then click home on knolix.com with infinite loop

Mint 2025.07.24.. Lásd a legutóbbi verzió

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Knolix Auto Tree Click and Home Click Loop
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Click on the bitcoin tree every 20 minutes and then click home on knolix.com with infinite loop
// @author       PixelHash
// @license      MIT
// @match        https://knolix.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const CLICK_INTERVAL = 20 * 60 * 1000; // 20 minutes

    function doubleClickTree() {
        const tree = document.getElementById('btctree');
        if (!tree) {
            console.log('Tree element not found');
            return false;
        }
        tree.click();
        setTimeout(() => tree.click(), 100);
        console.log('Double clicked the tree at', new Date().toLocaleTimeString());
        return true;
    }

    function clickHomeLink() {
        const homeLink = document.querySelector('a[href="/"].navlink.w-nav-link');
        if (homeLink) {
            homeLink.click();
            console.log('Clicked home link at', new Date().toLocaleTimeString());
        } else {
            console.log('Home link not found');
        }
    }

    function cycleClicks() {
        if (doubleClickTree()) {
            setTimeout(() => {
                clickHomeLink();
                setTimeout(cycleClicks, CLICK_INTERVAL);
            }, 3000);
        } else {
            console.log('Retrying in 1 minute...');
            setTimeout(cycleClicks, 60 * 1000);
        }
    }

    window.addEventListener('load', () => {
        // Start cycle 20 minutes after page load
        setTimeout(cycleClicks, CLICK_INTERVAL);
    });

})();