Sleazy Fork is available in English.

Random Clicker

Auto Clicker for Browsers!!

Verze ze dne 04. 09. 2023. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Random Clicker
// @namespace    
// @version      1.9
// @description  Auto Clicker for Browsers!!
// @author       
// @match        *://*/*
// @grant        none
// @icon         
// @compatible               chrome
// @compatible               firefox
// @compatible               opera
// @compatible               safari
// ==/UserScript==

let x, y, minCPS = 1, maxCPS = 5, autoClick;

document.addEventListener('keydown', function (evt) {
    if (evt.shiftKey && evt.key === 'J') {
        if (autoClick) {
            clearInterval(autoClick); // Clear the previous autoClick interval
        }

        alert("You may now click on any point in this tab to set the autoclicker to it. Have fun !!");

        document.addEventListener('click', function (event) {
            x = event.clientX;
            y = event.clientY;
            alert(`Mouse click at X: ${x}, Y: ${y}`);
            
            // Generate a new random CPS when the coordinate is set
            let randomCPS = Math.floor(Math.random() * (maxCPS - minCPS + 1)) + minCPS;
            
            autoClick = setInterval(function () {
                if (x !== undefined && y !== undefined) {
                    click(x, y, randomCPS); // Pass the coordinates and random CPS to the click function
                }
            }, 1000 / randomCPS); // Convert CPS to milliseconds
        });
    }
});

function click(x, y, randomCPS) {
    alert(`Click frequency: ${randomCPS} CPS\nCoordinates - X: ${x}, Y: ${y}`);
    
    let ev = new MouseEvent('click', {
        'view': window,
        'bubbles': true,
        'cancelable': true,
        'screenX': x,
        'screenY': y
    });

    let el = document.elementFromPoint(x, y);
    el.dispatchEvent(ev);
}