Make Upgradebar draggable.

Drag with right-click, upgrade with left click.

目前为 2021-05-01 提交的版本。查看 最新版本

// ==UserScript==
// @namespace    -
// @grant        none
// @version      1.1.0
// @author       Stew#4055
// @run-at       document-start
// @match        *://moomoo.io/*
// @match        *://dev.moomoo.io/*
// @match        *://sandbox.moomoo.io/*
// @supportURL   https://discord.gg/G2gJFbx7GD
// @name         Make Upgradebar draggable.
// @description  Drag with right-click, upgrade with left click.
// @require http://code.jquery.com/jquery-latest.min.js
// ==/UserScript==

class a {
    constructor() {
        $("body").on("contextmenu", function (e) {
            return false;
        });
        let e = document.getElementById("upgradeHolder");
        e.addEventListener("mousedown", function (t) {
            if (3 === t.which) {
                let o = t.clientX,
                    i = t.clientY;

                function n(t) {
                    let n = o - t.clientX,
                        l = i - t.clientY;
                    const c = e.getBoundingClientRect();
                    e.style.left = c.left - n + "px", e.style.top = c.top - l + "px", o = t.clientX, i = t.clientY
                }
                window.addEventListener("mousemove", n), window.addEventListener("mouseup", function e() {
                    window.removeEventListener("mousemove", n), window.removeEventListener("mouseup", e)
                })
            }
        })
    }
}
new a;

QingJ © 2025

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