Casino-Balance-wingman-lifesafer; Send shares from each profit to Trezor

Send 20 % from each won betround to your trezor ; ) youll love it

Versione datata 06/08/2020. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Casino-Balance-wingman-lifesafer; Send shares from each profit to Trezor
// @description  Send 20 % from each won betround to your trezor ; ) youll love it
// @description  Create your acc here to support my work https://stake.com/?c=263733c1bc
// @version      1.1
// @author       Dauersendung
// @namespace    https://greasyfork.org/de/users/444902-dauersendung
// @match https://stake.com/casino?currency=xrp&modal=vault&operation=deposit
// @match https://stake.com/?currency=btc&modal=vault&operation=deposit
// @match https://stake.com/?currency=doge&modal=vault&operation=deposit
// @match https://stake.com/?currency=xrp&modal=vault&operation=deposit
// @match https://stake.com/?currency=eth&modal=vault&operation=deposit
// @match https://stake.com/?currency=ltc&modal=vault&operation=deposit
// @match https://stake.com/?currency=trx&modal=vault&operation=deposit
// @match https://stake.com/?currency=bch&modal=vault&operation=deposit
// @match https://stake.com/?currency=eos&modal=vault&operation=deposit
// @match https://stake.com/?currency=btc&modal=deposit
// @match //your url here
// @description thats it.
// @require https://code.jquery.com/jquery-2.1.4.min.js
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @run-at document-start
// ==/UserScript==

var oldBal = 0;
var accessToken = localStorage.getItem('session').replace(/"/g, '');

function depositBal(depositAmount) {
    data = [
        {
            operationName: "CreateVaultDeposit",
            query: "mutation CreateVaultDeposit($amount: Float!, $currency: CurrencyEnum!) { createVaultDeposit(amount: $amount, currency: $currency) { id amount currency user { id balances { available { amount currency __typename } vault { amount currency __typename } __typename } __typename } __typename } } ",
            variables: {
                amount: depositAmount,
                currency: "xrp",
            }
        }
    ]
    return fetch("https://api.stake.com/graphql", {
        "credentials": "omit",
        "headers": {
            "content-type": "application/json",
            'x-access-token': accessToken,
            'x-lockdown-token': undefined
        },
        "referrer": "https://stake.com/?currency=xrp&modal=vault&operation=deposit",
        "body": JSON.stringify(data),
        "method": "POST",
        "mode": "cors"
    });
}

function checkBalance() {
    var curBalEle = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG");
    if (!curBalEle) return false;

    var curBal = curBalEle.innerText;
    if (!curBal) return false;

    if (curBal > oldBal) {
        var depositAmount = ((curBal - oldBal) * 20) / 100;
        depositBal(depositAmount).then(() => oldBal = curBalEle.innerText);
    }
}

window.setInterval(checkBalance, 3300);