Extra Croutons (BETA)+

An automation script for 4TSOS's Extra Croutons

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Extra Croutons (BETA)+
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  An automation script for 4TSOS's Extra Croutons
// @author       Hussam
// @match        *crouton.net/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=crouton.net
// @grant        none
// ==/UserScript==

(function() {

    let summonBtn = document.querySelector("body > button");
    let autoClicker = document.createElement("button", { class: "auto-clicker" });
    autoClicker.innerHTML = "Free Croutons";
    
    // style
    autoClicker.style.cssText = "float: right; margin: 8px; border: none; border-radius: 10px; width: 90px; height: 60px; background-color: #d2d2d2c";
    
    autoClicker.addEventListener('click', (sec) => {
        sec = prompt("a new crouton every __ second/s", 1)
        setInterval(() => {
            summonBtn.click();
        }, sec * 1000)
    }
                                 );
document.body.appendChild(autoClicker);

})();