Untitled

mail@pastecode.io avatar
unknown
plain_text
24 days ago
622 B
1
Indexable
Never
// Define the function to click on the body
function clickOnBody() {
    // Create a new mouse click event
    var event = new MouseEvent('click', {
        'view': window,
        'bubbles': true,
        'cancelable': true
    });

    // Dispatch the event to the body element
    document.body.dispatchEvent(event);
}

// Set interval to click every 10 milliseconds
var intervalID = setInterval(clickOnBody, 10);

// To stop the clicking after a certain duration (e.g., 1 minute)
setTimeout(function() {
    clearInterval(intervalID); // Stop the interval
}, 60000); // 60000 milliseconds = 1 minute
Leave a Comment