LitecoinBits Auto Roll

Faucet Automation

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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
    });

})();