[udit] chatgpt continue generating button automatic press

Automatically presses "continue generating" button in ChatGPT every 5 seconds.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         [udit] chatgpt continue generating button automatic press
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Automatically presses "continue generating" button in ChatGPT every 5 seconds.
// @author       You
// @match        https://chat.openai.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

function clickContinueGeneratingButton() {
    var buttons = document.getElementsByTagName('button');
    for (var i = 0; i < buttons.length; i++) {
        var buttonText = buttons[i].textContent.trim();
        if (buttonText === 'Continue generating') {
            buttons[i].click();
            break;
        }
    }
}

window.addEventListener('load', function() {
    setInterval(clickContinueGeneratingButton, 5000); // Executes every 5 seconds (5000 milliseconds)
}, false);