Make Upgradebar draggable.

Drag with right-click, upgrade with left click.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @namespace    -
// @grant        none
// @version      1.2.0.1
// @author       Stew#4055
// @run-at       document-start
// @match        *://moomoo.io/*
// @match        *://dev.moomoo.io/*
// @match        *://sandbox.moomoo.io/*
// @supportURL   https://discord.com/invite/G2gJFbx7GD
// @name         Make Upgradebar draggable.
// @description  Drag with right-click, upgrade with left click.
// @require http://code.jquery.com/jquery-latest.min.js
// ==/UserScript==
document.addEventListener("DOMContentLoaded", () => {
    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;
})