Greasy Fork is available in English.

Stake.com Speed Hacker

Adjusts HTML5 timing speed with a bottom-middle controller

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
  1. // ==UserScript==
  2. // @name Stake.com Speed Hacker
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description Adjusts HTML5 timing speed with a bottom-middle controller
  6. // @author jayef
  7. // @match https://stake.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Initial speed multiplier (1 = normal)
  15. let speedMultiplier = 1;
  16.  
  17. // Store original timing functions
  18. const originalSetTimeout = window.setTimeout;
  19. const originalSetInterval = window.setInterval;
  20. const originalRequestAnimationFrame = window.requestAnimationFrame;
  21.  
  22. // Function to apply speed changes
  23. function updateSpeed() {
  24. window.setTimeout = function(callback, delay, ...args) {
  25. return originalSetTimeout(callback, delay / speedMultiplier, ...args);
  26. };
  27. window.setInterval = function(callback, delay, ...args) {
  28. return originalSetInterval(callback, delay / speedMultiplier, ...args);
  29. };
  30. window.requestAnimationFrame = function(callback) {
  31. return originalRequestAnimationFrame(function(timestamp) {
  32. callback(timestamp / speedMultiplier);
  33. });
  34. };
  35. document.getElementById('speedDisplay').textContent = `${speedMultiplier.toFixed(1)}x`;
  36. console.log(`Speed updated to ${speedMultiplier}x`);
  37. }
  38.  
  39. // Create the controller UI
  40. const controller = document.createElement('div');
  41. controller.style.position = 'fixed';
  42. controller.style.bottom = '10px';
  43. controller.style.left = '50%';
  44. controller.style.transform = 'translateX(-50%)';
  45. controller.style.backgroundColor = '#333';
  46. controller.style.color = '#fff';
  47. controller.style.padding = '10px';
  48. controller.style.borderRadius = '5px';
  49. controller.style.zIndex = '9999';
  50. controller.style.display = 'flex';
  51. controller.style.gap = '10px';
  52. controller.style.fontFamily = 'Arial, sans-serif';
  53.  
  54. // Speed decrease button
  55. const decreaseBtn = document.createElement('button');
  56. decreaseBtn.textContent = '-';
  57. decreaseBtn.style.padding = '5px 10px';
  58. decreaseBtn.style.cursor = 'pointer';
  59. decreaseBtn.addEventListener('click', () => {
  60. speedMultiplier = Math.max(0.1, speedMultiplier - 0.1); // Minimum 0.1x
  61. updateSpeed();
  62. });
  63.  
  64. // Speed display
  65. const speedDisplay = document.createElement('span');
  66. speedDisplay.id = 'speedDisplay';
  67. speedDisplay.textContent = '1.0x';
  68. speedDisplay.style.padding = '5px';
  69.  
  70. // Speed increase button
  71. const increaseBtn = document.createElement('button');
  72. increaseBtn.textContent = '+';
  73. increaseBtn.style.padding = '5px 10px';
  74. increaseBtn.style.cursor = 'pointer';
  75. increaseBtn.addEventListener('click', () => {
  76. speedMultiplier = Math.min(10, speedMultiplier + 0.1); // Maximum 10x
  77. updateSpeed();
  78. });
  79.  
  80. // Reset button
  81. const resetBtn = document.createElement('button');
  82. resetBtn.textContent = 'Reset';
  83. resetBtn.style.padding = '5px 10px';
  84. resetBtn.style.cursor = 'pointer';
  85. resetBtn.addEventListener('click', () => {
  86. speedMultiplier = 1;
  87. updateSpeed();
  88. });
  89.  
  90. // Assemble the controller
  91. controller.appendChild(decreaseBtn);
  92. controller.appendChild(speedDisplay);
  93. controller.appendChild(increaseBtn);
  94. controller.appendChild(resetBtn);
  95. document.body.appendChild(controller);
  96.  
  97. // Apply initial speed settings
  98. updateSpeed();
  99. })();