Visually improve moomoo.io by changing the style of the storeHolder, chatBox, and ageBar element
当前为
// ==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);
})();