MooMoo.io Visuals

Visually improve moomoo.io by changing the style of the storeHolder, chatBox, and ageBar element

当前为 2024-05-17 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         MooMoo.io Visuals
// @name:es      MooMoo.io Visuales
// @name:ru      Визуальные улучшения для MooMoo.io
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Visually improve moomoo.io by changing the style of the storeHolder, chatBox, and ageBar element
// @description:es  Mejora visualmente moomoo.io cambiando el estilo del elemento storeHolder, chatBox y ageBar
// @description:ru  Визуальное улучшение для moomoo.io путем изменения стиля элементов storeHolder, chatBox и ageBar
// @author       Tu Nombre
// @match        *://moomoo.io/*
// @match        *://sandbox.moomoo.io/*
// @require      https://greasyfork.org/scripts/423602-msgpack/code/msgpack.js
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    const handleMutations = (mutationsList) => {
        for (const mutation of mutationsList) {
            if (mutation.target.id === "killCounter") {
                const count = parseInt(mutation.target.innerText, 10) || 0;
                if (count > prevCount) {
                    chat("gg - MooMoo.io Visuals");
                    prevCount = count;
                }
            }
        }
    };

    const observer = new MutationObserver(handleMutations);
    observer.observe(document, {
        subtree: true,
        childList: true,
    });

    function changeStyle() {
        var storeHolder = document.getElementById('storeHolder');
        var chatBox = document.getElementById('chatBox');
        var ageBar = document.getElementById('ageBar');

        if (storeHolder) {
            storeHolder.style.height = '600px';
            storeHolder.style.width = '400px';
        }

        if (chatBox) {
            chatBox.style.backgroundColor = 'rgb(0 0 0 / 0%)';
        }

        if (ageBar) {
            ageBar.style.backgroundColor = 'rgba(0, 128, 0, 0.8)';
            ageBar.style.border = '2px solid rgba(0, 128, 0, 0.5)';
        }

        if (storeHolder && chatBox && ageBar) {
            clearInterval(intervalId);
        }
    }

    var intervalId = setInterval(changeStyle, 500);
})();