autoBoo

Clicks on an element with a random delay, repeats the process, and refreshes the page every 5 minutes on https://boo.world/match

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         autoBoo
// @namespace    http://your.namespace/
// @version      0.2
// @description  Clicks on an element with a random delay, repeats the process, and refreshes the page every 5 minutes on https://boo.world/match
// @author       You
// @match        https://boo.world/match
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to generate a random delay between given minimum and maximum values
    function getRandomDelay(min, max) {
        return Math.floor(Math.random() * (max - min + 1)) + min;
    }

    // Recursive function to find and click on an element with a random delay
    function clickElement() {
        // XPath to locate the element on the page
        const path = '//div[@id="actionButtons"]/div/div/div[7]/img';
        const xPathRes = document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
        const element = xPathRes.singleNodeValue;

        if (element) {
            // If the element is found, click it
            element.click();
            console.log('Element clicked successfully.');

            // Repeat the process after a random delay
            const randomDelay = getRandomDelay(1000, 10000);
            console.log(`Repeating in ${randomDelay} milliseconds...`);
            setTimeout(clickElement, randomDelay);
        } else {
            // If the element is not found, wait with a random delay and then retry
            const randomDelay = getRandomDelay(1000, 10000);
            console.log(`Element not found. Retrying in ${randomDelay} milliseconds...`);
            setTimeout(clickElement, randomDelay);
        }
    }

    // Function to refresh the page every 5 minutes
    function refreshPage() {
        console.log('Refreshing page...');
        location.reload(true);
    }

    // Start the recursive function
    clickElement();

    // Refresh the page every 5 minutes (300,000 milliseconds)
    setInterval(refreshPage, 300000);
})();