LOLBeans.io Idler

Get LOLBeans colors and accessories while doing absolutely nothing

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name          LOLBeans.io Idler
// @description   Get LOLBeans colors and accessories while doing absolutely nothing
// @author        https://github.com/abbydiode
// @version       2021.02.09a
// @match         https://lolbeans.io/*
// @require       https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @namespace https://greasyfork.org/users/875843
// ==/UserScript==

function startIdler() {
    let idleTime = sessionStorage.idleTime ?? 0;
    let playButton = $('#btn-play')[0];
    console.log('LOLBeans Idler Started');
    sessionStorage.idling = true;
    playButton.click();

    setInterval(() => {
        sessionStorage.idleTime = ++idleTime;
        $('#idle-info')[0].textContent = 'You\'ve idled for ' + idleTime + ' seconds';

        $('.continue-btn.visible')[0].click();
        $('.new-game-btn.visible')[0].click();
    }, 1000);
}

function loadUI() {
    $('#btn-play').after('<button id="btn-idle" class="cta" style="font-size:large;margin-top: 16px;">Start Idling</button>');
    $('#btn-idle').click(() => startIdler());
    $('#death-screen-quit-btn').click(() => {
        console.log('LOLBeans Idler Stopped');
        sessionStorage.idling = false;
    		sessionStorage.idleTime = 0;
        location.reload();
    });
    let idleTime = 0;
    $('#fps').after('<div id="idle-info" style="font-family: Arial; position: absolute; bottom: 22px; left: 16px; z-index: 100; font-size: 12px; color: #fff; background-color: rgba(0,0,0,.2);">Idler Disabled</div>')
}

$(() => {
    loadUI();
    if (sessionStorage.idling === "true") { setTimeout(() => startIdler(), 1000); }
});