您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Change the resolution of canvas to boost your FPS
- // ==UserScript==
- // @name MooMoo.io Change Resolution
- // @description Change the resolution of canvas to boost your FPS
- // @author WEIRD
- // @match *://*.moomoo.io/*
- // @icon https://moomoo.io/img/favicon.png?v=1
- // @run-at document-start
- // @grant unsafeWindow
- // @license MIT
- // @version 0.1.1
- // @namespace https://gf.qytechs.cn/users/999838
- // ==/UserScript==
- ;(() => {
- unsafeWindow.changeResolution = true
- const checkTrustedSymbol = Symbol("checkTrusted")
- Object.defineProperty(Object.prototype, "checkTrusted", {
- get() {
- return this[checkTrustedSymbol]
- },
- set() {
- delete Object.prototype.checkTrusted
- this.checkTrusted = (e) => e
- },
- configurable: true
- })
- var resolutionValue = localStorage.getItem("resolutionValue")
- if (resolutionValue == null) {
- resolutionValue = 0.9
- localStorage.setItem("resolutionValue", resolutionValue)
- }
- unsafeWindow.addEventListener("DOMContentLoaded", () => {
- const parent =
- document.getElementsByClassName("settingRadio")[0]
- parent.childNodes[1].textContent = " Change Resolution"
- unsafeWindow.devicePixelRatio = resolutionValue
- document.getElementById("nativeResolution").dispatchEvent(
- new Event("change")
- )
- const container = document.createElement("div")
- container.className = "settingRadio"
- const numInput = document.createElement("input")
- numInput.type = "number"
- numInput.step = "0.1"
- numInput.min = "0.1"
- numInput.max = "3"
- numInput.value = resolutionValue
- numInput.addEventListener("change", (event) => {
- if (event.target.value < event.target.min) {
- event.target.value = event.target.min
- } else if (event.target.value > event.target.max) {
- event.target.value = event.target.max
- } else if (event.target.value == null) {
- event.target.value = 0.9
- }
- resolutionValue = unsafeWindow.devicePixelRatio = event.target.value
- localStorage.setItem("resolutionValue", resolutionValue)
- document.getElementById(
- "nativeResolution"
- ).dispatchEvent(new Event("change"))
- })
- container.appendChild(numInput)
- parent.parentNode.insertBefore(container, parent.nextSibling)
- })
- })()
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址