您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display FPS
当前为
// ==UserScript== // @name MooMoo.io Show FPS // @description Display FPS // @author KOOKY WARRIOR // @match *://*.moomoo.io/* // @icon https://moomoo.io/img/favicon.png?v=1 // @require https://cdnjs.cloudflare.com/ajax/libs/msgpack-lite/0.1.26/msgpack.min.js // @run-at document-start // @grant unsafeWindow // @license MIT // @version 0.2.1 // @namespace https://gf.qytechs.cn/users/999838 // ==/UserScript== ;(() => { unsafeWindow.showFPS = true const element = document.createElement("div") element.id = "fps" element.style = ` position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: white; ` let inGame = false new Promise(async (resolve) => { let { send } = WebSocket.prototype WebSocket.prototype.send = function (...x) { send.apply(this, x) this.send = send this.addEventListener("message", (e) => { if (!e.origin.includes("moomoo.io") && !unsafeWindow.privateServer) return const [packet, data] = msgpack.decode(new Uint8Array(e.data)) switch (packet) { case "1": inGame = true break case "11": inGame = false update() break } }) resolve(this) } }) unsafeWindow.addEventListener("DOMContentLoaded", () => { document.getElementById("mainMenu").appendChild(element) }) function update() { const updateDelay = 500 let lastFpsUpdate = 0 let frames = 0 function updateFPS() { let now = Date.now() let elapsed = now - lastFpsUpdate if (elapsed < updateDelay) { ++frames } else { element.innerText = `Fps: ${Math.round(frames / (elapsed / 1000))}` frames = 0 lastFpsUpdate = now } if (!inGame) { unsafeWindow.requestAnimationFrame(updateFPS) } } lastFpsUpdate = Date.now() unsafeWindow.requestAnimationFrame(updateFPS) } update() })()
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址