SBAuto Randomized

Automates Swagbucks surveys with randomized answers until no questions remain

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo 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         SBAuto Randomized
// @namespace    http://tampermonkey.net/
// @version      2.2
// @description  Automates Swagbucks surveys with randomized answers until no questions remain
// @author       Thaswasupbreh
// @match        http://www.swagbucks.com/surveys?t=1&m=17&a=1&s=44834408&ls=7
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const autoClickInterval = 1000; // Interval in ms

    setInterval(() => {
        try {
            const dropdownContainer = document.querySelector(".questionDropdownContainer");
            if (dropdownContainer) dropdownContainer.click();

            const optionsContainer = document.querySelector(".questionDropdownOptions");
            const options = optionsContainer ? optionsContainer.querySelectorAll("span") : [];

            if (options.length > 0) {
                const randomIndex = Math.floor(Math.random() * options.length);
                options[randomIndex].click();
            }

            const submitButton = document.querySelector(".surveyQuestionCTA button");
            if (submitButton) submitButton.click();
        } catch (err) {
            console.error("SBAuto Error:", err);
        }
    }, autoClickInterval);
})();