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

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

目前為 2020-08-06 提交的版本,檢視 最新版本

// ==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
// @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==

//read balance
var oldBalacne=0;
window.setInterval(function(){
checkIfBalanceChanged();
}, 3300);
function checkIfBalanceChanged(){
var currentbalance=document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG');
if(document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG').length > 0){
currentbalance = document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG')[0].innerText;
if(currentbalance != '') {
console.log('old balance : ' + oldBalacne);
console.log('current balance : ' + currentbalance);
console.log('profit : ' + (currentbalance - oldBalacne));
if (currentbalance > oldBalacne) {
var nb=(currentbalance - oldBalacne)
prof(nb);
}
oldBalacne = currentbalance;
}
}
}
//send to trezor
function prof(nb){
//setTimeout(function(){
//document.getElementsByClassName('Link-q08rh0-0 fODGkp')[0].click();
//},20);
setTimeout(function(){
document.getElementsByClassName('NavLink__StylesNavLink-sc-140hi5a-0 etHlta')[3].click();
},1200);
var profit =nb/100*20;//send profitshares to Trezor set the value in % like  20% from the last rounds profit = /100*20
var amountField = document.getElementsByClassName('styles__InputField-ix7z99-3 gQVvYS')[0];   // Selector für "Amount field"
var submitButton = document.getElementsByClassName('Button__StyledButton-sc-8bd3dp-0 fbjzSA')[0]; // Selector für "submit button"
var changeEvent = new Event('change', { bubbles: true }); // Change-Event, wird unten gebraucht.

amountField.setAttribute("value", profit);  // Der Wert muss in dem Attribut "value" gesetzt werden
amountField.dispatchEvent(changeEvent);     // Dast ist neu!! Du musst ein "change"-Event triggern, damit der Submit-Button "aktiviert" wird
     setTimeout(function(){
    document.getElementsByClassName('styles__InputField-ix7z99-3 gQVvYS')[0].stepUp(1);
         },220);
    setTimeout(function(){
	submitButton.click(); // Nach 10ms soll der SubmitButton geklickt werden
},10);
        setTimeout(function(){
document.getElementsByClassName('styles__Overlay-zpe6xd-0 styles__Overlay-sc-10hovo3-0 dEvggc')[0].click();
},3000);
setTimeout(function(){
document.getElementsByClassName('Link-q08rh0-0 fODGkp')[0].click(); // schliessen
},750);
    document.getElementsByClassName('NavLink__StylesNavLink-sc-140hi5a-0 etHlta')[3].click(); // schliessen
}


// setTimeout(function(){
//document.getElementsByClassName('Link-q08rh0-0 fODGkp')[0].click();
//},1000); //my part works

//setTimeout(function(){
//document.getElementsByClassName('NavLink__StylesNavLink-sc-140hi5a-0 etHlta')[3].click();
// },1000);


//document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG')[0].innerText /300*10;
//document.getElementsByClassName('styles__InputField-ix7z99-3 gQVvYS')[0].value= Text((profit).toFixed(8)); //paste var profit
//document.getElementsByClassName('styles__InputField-ix7z99-3 gQVvYS')[0].stepUp(1);
//document.getElementsByClassName('styles__InputField-ix7z99-3 gQVvYS')[0].value= profit; //betrag einzeben
//document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG')[0].innerText /100*10;
//document.getElementsByClassName('styles__InputField-ix7z99-3 gQVvYS')[0].stepUp(1);