SBAuto Randomized

Automates Swagbucks surveys with randomized answers until no questions remain

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         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);
})();