LitecoinBits Auto Roll

Faucet Automation

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

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         LitecoinBits Auto Roll
// @namespace    LitecoinBits Auto faucet claim
// @version      1.0
// @description  Faucet Automation
// @author       Shnethan
// @match        https://litecoinbits.com/*
// @icon         https://litecoinbits.com/static/favicon-32x32.png
// @license      GPL-3.0
// @grant        none

// ==/UserScript==

(function() {

    'use strict';

    const u = window.location;
    const x = 'https://litecoinbits.com/?ref=26886';

    if (u.pathname === '/' && u.search === '') {
        window.location.replace(x);
        return;
    }

    if (!u.search.includes('ref=26886')) return;

    let r = false;
    let f = false;

    const o = new MutationObserver(() => {

        if (!r) {
            const b = document.querySelectorAll("button");

            b.forEach(btn => {
                if (
                    btn.innerText.includes("Roll") &&
                    btn.innerText.includes("Win") &&
                    btn.offsetParent !== null
                ) {
                    btn.click();
                    r = true;
                }
            });
        }

        if (r && !f) {
            const s = document.querySelector('#faucetMessage .alert-success');

            if (s) {
                const rb = s.querySelector('button.btn-danger');

                if (rb) {
                    rb.click();
                    f = true;
                    o.disconnect();
                }
            }
        }

    });

    o.observe(document.body, {
        childList: true,
        subtree: true
    });

})();