// ==UserScript== // @name FPS Booster [Sploop.io, Moomoo.io and other] (if you want me to add sites, dm me) // @namespace https://greasyfork.org/en/users/1064285-vcrazy-gaming // @version 1.0 // @description Improve MooMoo.io FPS performance.(if you want me to add sites, dm me) // @author _VcrazY_ // @match *://*.moomoo.io/* // @match *://*.sploop.io/* // @grant none // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/475153/FPS%20Booster%20%5BSploopio%2C%20Moomooio%20and%20other%5D%20%28if%20you%20want%20me%20to%20add%20sites%2C%20dm%20me%29.user.js // @updateURL https://update.greasyfork.icu/scripts/475153/FPS%20Booster%20%5BSploopio%2C%20Moomooio%20and%20other%5D%20%28if%20you%20want%20me%20to%20add%20sites%2C%20dm%20me%29.meta.js // ==/UserScript== (function () { 'use strict'; let animationFrameId; const startAnimationFrame = (previousTimestamp = performance.now(), remainingFrameTime = 0) => { let timeElapsedSinceLastFrame = performance.now() - previousTimestamp, targetFrameInterval = 16.67 - timeElapsedSinceLastFrame + remainingFrameTime, frameDelay = targetFrameInterval - (0 | targetFrameInterval); animationFrameId = requestAnimationFrame(() => startAnimationFrame(previousTimestamp, frameDelay)); }; startAnimationFrame(); window.addEventListener("beforeunload", () => { animationFrameId && cancelAnimationFrame(animationFrameId); }); })();