[0]Balance-Wingman https://stake.com/?c=263733c1bc

Setup the amount from each win to be sent to Vaulet in the line(66) /////////// Setup Profit here in Decimal: 50 % = 0.50 - 75 % = 0.75 - 15 % = 0.15

当前为 2020-08-13 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name [0]Balance-Wingman https://stake.com/?c=263733c1bc
  3. // @description Setup the amount from each win to be sent to Vaulet in the line(66) /////////// Setup Profit here in Decimal: 50 % = 0.50 - 75 % = 0.75 - 15 % = 0.15
  4. // @description Cryptocurrency is shown in Crypto and $
  5. // @description Create your acc here to support my work https://stake.com/?c=263733c1bc
  6. // @version 2.1
  7. // @author Dauersendung
  8. // @namespace https://greasyfork.org/de/users/444902-dauersendung
  9. // @match https://stake.com/*
  10. // @run-at document-start
  11. // ==/UserScript==
  12. var accessToken = localStorage.getItem('session').replace(/"/g, '');
  13. var oldBal = '';
  14. function getCurrency() {
  15. return JSON.parse(localStorage.getItem("v2_currency")).currency;
  16. }
  17. function getRate(cur) {
  18. return JSON.parse(localStorage.getItem('v2_currency')).conversions.rates[cur];
  19. }
  20. function convertCurrency(cur, val) {
  21. return val * getRate(cur);
  22. }
  23. function getConversionElem() {
  24. var ele = document.querySelector("#conversionElem");
  25. if(ele == null) {
  26. ele = document.createElement("span");
  27. ele.id = "conversionElem";
  28. ele.innerText = "0.00$";
  29. document.querySelector(".styles__Wrap-rlm06o-0.bGSyHm").insertBefore(ele, null);
  30. }
  31.  
  32. return ele;
  33. }
  34. window.onload = function loadpage(){
  35. console.log(document.readyState);
  36. if (document.readyState === 'complete') {
  37. var oldBal = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText;
  38. var curBalEle = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText;
  39. function tresor(){
  40. oldBal = curBalEle
  41. if (oldBal = curBalEle){
  42. function depositBal(depositAmount) {
  43. var curr = getCurrency();
  44. var data = [{
  45. operationName: "CreateVaultDeposit",
  46. 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 } } ",
  47. variables: {
  48. amount: depositAmount,
  49. currency: curr,}}]
  50. return fetch("https://api.stake.com/graphql", {
  51. "credentials": "omit",
  52. "headers": {
  53. "content-type": "application/json",
  54. 'x-access-token': accessToken,
  55. 'x-lockdown-token': undefined},
  56. "referrer": "https://stake.com/?currency=" + curr + "&modal=vault&operation=deposit",
  57. "body": JSON.stringify(data),
  58. "method": "POST",
  59. "mode": "cors"});}
  60. function checkBalance() {
  61. var curBalEle=document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG");
  62. if(document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG').length > 0){
  63. curBalEle = document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG')[0].innerText;
  64. if(curBalEle != '') {
  65. //console.log('balance changed');
  66. //console.log('old balance : ' + oldBal);
  67. //console.log('current balance : ' + curBalEle);
  68. if (curBalEle > oldBal) {
  69. var depositAmount = ((curBalEle - oldBal) * 0.75); /////////// Setup Profit here in Decimal: 50 % = 0.50 - 75 % = 0.75 - 15 % = 0.15
  70. depositBal(depositAmount).then(() => {
  71. oldBal = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText;
  72. localStorage.setItem("oldBal", oldBal);
  73. getConversionElem().innerText = convertCurrency(getCurrency(), curBalEle).toFixed(2) + "$";
  74. oldBal = curBalEle;
  75. });}
  76. oldBal = curBalEle;
  77. }}}window.setInterval(checkBalance, 751);}//timerspeed read send to tresor
  78. else{
  79. tresor();//if different balance run func tresor
  80. }}var myTimer = setTimeout(tresor, 5500);}}; //timer func(tresor)