Wager Left

05/12/2024 00:00:00

  1. // ==UserScript==
  2. // @name Wager Left
  3. // @namespace Violentmonkey Scripts
  4. // @match https://stake.com/*
  5. // @match https://stake.ac/*
  6. // @match https://stake.games/*
  7. // @match https://stake.bet/*
  8. // @match https://stake.pet/*
  9. // @match https://stake1001.com/*
  10. // @match https://stake1002.com/*
  11. // @match https://stake1003.com/*
  12. // @match https://stake1021.com/*
  13. // @match https://stake1022.com/*
  14. // @match https://stake.mba/*
  15. // @match https://stake.jp/*
  16. // @match https://stake.bz/*
  17. // @match https://staketr.com/*
  18. // @match https://stake.ceo/*
  19. // @match https://stake.krd/*
  20. // @grant none
  21. // @version 1.1
  22. // @author ConnorMcLeod
  23. // @description 05/12/2024 00:00:00
  24. // @license MIT
  25. // ==/UserScript==
  26.  
  27. const ranksWager = {
  28. "Bronze": 10000,
  29. "Silver": 40000,
  30. "Argent": 40000,
  31. "Gold": 50000,
  32. "Or": 50000,
  33.  
  34. "Platinum": 150000,
  35. "Platine": 150000,
  36. "Platinum II": 250000,
  37. "Platine II": 250000,
  38. "Platinum III": 500000,
  39. "Platine III": 500000,
  40.  
  41. "Platinum IV": 1500000,
  42. "Platine IV": 1500000,
  43. "Platinum V": 2500000,
  44. "Platine V": 2500000,
  45. "Platinum VI": 5000000,
  46. "Platine VI": 5000000,
  47.  
  48. "Diamond": 15000000,
  49. "Diamant": 15000000,
  50. "Diamond II": 25000000,
  51. "Diamant II": 25000000,
  52. "Diamond III": 50000000,
  53. "Diamant III": 50000000,
  54.  
  55. "Diamond IV": 150000000,
  56. "Diamant IV": 150000000,
  57. "Diamond V": 250000000,
  58. "Diamant V": 250000000,
  59. "Obsidian": 500000000,
  60.  
  61. "Obsidian II": 1500000000,
  62. "Opal I": 2500000000,
  63. "Opal II": 5000000000,
  64.  
  65. "Plutonium": 15000000000,
  66. };
  67.  
  68. let timeout = null;
  69. const removeTimeOut = (() => {
  70. if (timeout) {
  71. clearTimeout(timeout);
  72. timeout = null;
  73. }
  74. });
  75.  
  76. function checkProgressBars(delay) {
  77. removeTimeOut();
  78. timeout = setTimeout(function() {
  79. removeTimeOut();
  80. progressBars = Array.from(document.querySelectorAll('[data-melt-progress=""')).filter(e => !e.parentNode.classList.contains("raffle-progress"));
  81. // console.log(`PROGRESS BARS : ${progressBars.length}`);
  82. progressBars.forEach(progressBar => {
  83. let span = progressBar.parentNode.querySelector('span[id="wagerLeft"]');
  84.  
  85. ranks = progressBar.nextElementSibling;
  86. if (ranks) {
  87. szNextRank = ranks.innerText.split('\n')[1];
  88. if (!(szNextRank in ranksWager)) {
  89. return;
  90. }
  91. wagerLeft = ranksWager[szNextRank] * (1 - progressBar.ariaValueNow / 100);
  92. szWagerLeft = wagerLeft.toLocaleString(undefined, {
  93. style: 'currency',
  94. currency: 'USD'
  95. }).replace(/\s/, ' ');
  96.  
  97. if (!span) {
  98. div = document.createElement('div');
  99. span = document.createElement('span');
  100. span.id = "wagerLeft";
  101. div.appendChild(span);
  102. progressBar.parentNode.appendChild(div);
  103. }
  104. span.innerText = `Wager left : ${szWagerLeft}`;
  105. }
  106. });
  107. }, delay);
  108. }
  109.  
  110. (function(history) {
  111. var pushState = history.pushState;
  112. history.pushState = function(state) {
  113. // Appelez la méthode pushState originale
  114. pushState.apply(history, arguments);
  115. // Déclenchez un événement personnalisé ou loggez l'URL
  116. // console.log('Navigation via pushState vers :', window.location.href);
  117. checkProgressBars(500);
  118. };
  119.  
  120. var replaceState = history.replaceState;
  121. history.replaceState = function(state) {
  122. replaceState.apply(history, arguments);
  123. // console.log('Navigation via replaceState vers :', window.location.href);
  124. checkProgressBars(500);
  125. };
  126. })(window.history);
  127.  
  128. window.onload = (() => {
  129. // console.log('[window.onload] :', window.location.href);
  130. checkProgressBars(1000);
  131. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址