E-Better

Custom menu for Evades with improved styles

Stan na 18-03-2024. Zobacz najnowsza wersja.

// ==UserScript==
// @name         E-Better
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  Custom menu for Evades with improved styles
// @author       Alertix(aka Failure), thanks to EtherCD(aka ✺Mistake✺) (https://github.com/EtherCD). (for making Map Filling for Beauty). thanks to waterfowlgeneral for drawing the evades t-shirt "got res?"
// @match        https://evades.online/*
// @match        https://evades.io/*
// @icon         https://u.cubeupload.com/FailureEvades/evadesactions.png
// @grant        GM_addStyle
// @license      @license
// ==/UserScript==

(function() {
    'use strict';

    if (window.location.href.startsWith("https://evades.online/")) {
    GM_addStyle("body { background-image: url(https://u.cubeupload.com/FailureEvades/gotresbge.png); font-family: Verdana,Arial,Times,serif; }");
    GM_addStyle(".title-image { width: 374px; height: 210px; background-image: url('https://u.cubeupload.com/FailureEvades/imageremovebgpreview.png'); background-repeat: no-repeat; background-size: contain; margin: 0 auto; display: block; }");
    GM_addStyle(".hall-of-fame { width: 350px; color: #fff; border: 1px solid #585858; border-radius: 5px; margin: 20px auto 0; padding: 6px; }");
    GM_addStyle(".button { color: #fff;cursor: pointer;background-color: #000080;border: none;border-radius: 5px;margin: 4px 2px;padding: 8px 12px;font-size: 15px;display: block; }");
    GM_addStyle(".button:hover { background: #323299; }");
    GM_addStyle(".button:disabled { cursor: default; color: #fff;background-color: #00004c; }");
    GM_addStyle(".hero-select-heroes-container { width: 2000px;height: auto;flex-wrap: wrap;justify-content: center;margin: 25px auto 0 -410px;display: flex; overflow-y: visible; }");
    GM_addStyle(".choose-your-hero-image { width: 500px;height: 100px;background-image: url(https://u.cubeupload.com/FailureEvades/f7eimageremovebgpreview.png);background-size: contain;margin: 0 auto; }");
    GM_addStyle(".quick-play-button { width: 232px;height: 70px;text-align: center;margin: 0 auto 7px;font-size: 30px;line-height: 70px;display: block; }");
    GM_addStyle(".server-list-how-to-play-container { text-align: center;margin: 0 auto;display: block; }");
    GM_addStyle(".server-list-button { width: 100px;height: 20px;text-align: center;border-radius: 0;margin-right: 5px;line-height: 20px;display: inline-block; }");
    GM_addStyle(".how-to-play-button { width: 100px;height: 20px;text-align: center;border-radius: 0;line-height: 20px;display: inline-block; }");
    GM_addStyle(".menu-back-button { width: 100px;text-align: center;clear: both;margin: 20px auto;display: block; }");
    GM_addStyle(".game-servers-list { text-align: center;width: 885px;margin: 0 auto; }");
    GM_addStyle(".game-server { color: #fff;cursor: pointer;text-align: center;width: 150px;background-color: #000080;border: none;border-radius: 5px;margin: 10px;padding: 8px;font-size: 15px;line-height: 25px; display: inline-block; }");
    GM_addStyle(".game-server:hover { background: #323299; }");
    GM_addStyle(".results-play-again { width: 150px;text-align: center;margin: 50px auto 0;font-size: 25px; }");
    GM_addStyle(".collection-title { text-align: center;margin: 10px;font-size: 23px;color: lightgrey; }");
    GM_addStyle(".collection { width: 1000px;background-color: #292929c4;border-radius: 35px;flex-wrap: wrap;justify-content: center;align-items: flex-start;margin: 0 auto;padding: 10px;display: flex; }");
    GM_addStyle(".accessory { width: 120px;padding: 15px; }");
    GM_addStyle(".accessory img { width: 70px;height: 70px;border: 1px solid #e2e2e240; }");
    GM_addStyle("; }");
    GM_addStyle("; }");
    GM_addStyle("; }");

    const menu = document.createElement('div');
    menu.setAttribute('id', 'customMenu');
    menu.style.position = 'fixed';
    menu.style.top = '50%';
    menu.style.left = '0';
    menu.style.transform = 'translateY(-50%)';
    menu.style.background = 'rgba(0, 0, 0, 0.7)';
    menu.style.width = '50px';
    menu.style.height = '100vh';
    menu.style.display = 'block';
    menu.style.transition = 'width 0.5s';

    const settingsButton = document.createElement('img');
    settingsButton.src = 'https://evades.io/options.8b56ab3c.png';
    settingsButton.alt = 'Settings';
    settingsButton.style.position = 'absolute';
    settingsButton.style.top = '10px';
    settingsButton.style.left = '10px';
    settingsButton.style.width = '30px';
    settingsButton.style.height = 'auto';
    settingsButton.style.cursor = 'pointer';
    settingsButton.addEventListener('click', function() {
        toggleSubMenu();
    });

const cursorChangerButton = document.createElement('img');
cursorChangerButton.src = 'https://u.cubeupload.com/FailureEvades/CursorChanger.png';
cursorChangerButton.alt = 'Cursor Changer';
cursorChangerButton.style.position = 'absolute';
cursorChangerButton.style.top = '55px';
cursorChangerButton.style.left = '10px';
cursorChangerButton.style.width = '30px';
cursorChangerButton.style.height = 'auto';
cursorChangerButton.style.cursor = 'pointer';
cursorChangerButton.addEventListener('click', function() {
    toggleCursorChangerSubMenu();
});

const cursorChangerSubMenu = document.createElement('div');
cursorChangerSubMenu.setAttribute('id', 'cursorChangerSubMenu');
cursorChangerSubMenu.style.position = 'absolute';
cursorChangerSubMenu.style.top = '55px';
cursorChangerSubMenu.style.left = '50px';
cursorChangerSubMenu.style.width = '0';
cursorChangerSubMenu.style.height = '70px';
cursorChangerSubMenu.style.background = 'rgba(0, 0, 0, 0.7)';
cursorChangerSubMenu.style.transition = 'width 0.5s';
cursorChangerSubMenu.style.overflow = 'hidden';

const changeCursorButton = document.createElement('img');
changeCursorButton.src = 'https://u.cubeupload.com/FailureEvades/arrowIcon.png';
changeCursorButton.alt = 'Change Cursor';
changeCursorButton.style.color = '#ffffff';
changeCursorButton.style.position = 'absolute';
changeCursorButton.style.top = '5px';
changeCursorButton.style.left = '20px';
changeCursorButton.style.width = '20px';
changeCursorButton.style.height = 'auto';
changeCursorButton.style.cursor = 'pointer';
changeCursorButton.addEventListener('click', function() {
    changeCursor();
});

const currentCursorText = document.createElement('div');
currentCursorText.textContent = 'Current Cursor: Normal';
currentCursorText.style.color = '#ffffff';
currentCursorText.style.position = 'absolute';
currentCursorText.style.top = '5px';
currentCursorText.style.left = '50px';
currentCursorText.style.padding = '5px';
currentCursorText.style.display = 'inline-block';


let currentCursor = 'normal';

cursorChangerSubMenu.appendChild(currentCursorText);
cursorChangerSubMenu.appendChild(changeCursorButton);

function changeCursor() {
    const body = document.querySelector('body');
    if (currentCursor === 'normal') {
        body.style.cursor = 'crosshair';
        currentCursorText.textContent = 'Current Cursor: Crosshair';
        currentCursor = 'crosshair';
    } else {
        body.style.cursor = 'auto';
        currentCursorText.textContent = 'Current Cursor: Normal';
        currentCursor = 'normal';
    }
}

menu.appendChild(cursorChangerButton);
document.body.appendChild(cursorChangerSubMenu);

function toggleCursorChangerSubMenu() {
    if (cursorChangerSubMenu.style.width === '0px') {
        cursorChangerSubMenu.style.width = '200px';
    } else {
        cursorChangerSubMenu.style.width = '0';
    }
}

const creditsButton = document.createElement('img');
creditsButton.src = 'https://evades.io/question.bc02e04b.png';
creditsButton.alt = 'Credits';
creditsButton.style.position = 'absolute';
creditsButton.style.top = '100px';
creditsButton.style.left = '10px';
creditsButton.style.width = '30px';
creditsButton.style.height = 'auto';
creditsButton.style.cursor = 'pointer';
creditsButton.addEventListener('click', function() {
    toggleCreditsSubMenu();
});

const creditsSubMenu = document.createElement('div');
creditsSubMenu.setAttribute('id', 'creditsSubMenu');
creditsSubMenu.style.position = 'absolute';
creditsSubMenu.style.top = '100px';
creditsSubMenu.style.left = '50px';
creditsSubMenu.style.width = '0px';
creditsSubMenu.style.height = '150px';
creditsSubMenu.style.background = 'rgba(0, 0, 0, 0.7)';
creditsSubMenu.style.transition = 'width 1.5s';
creditsSubMenu.style.overflow = 'hidden';

const currentCreditsText = document.createElement('div');
currentCreditsText.textContent = 'Thanks to: EtherCD(aka ✺Mistake✺)'
currentCreditsText.style.color = '#ffffff';
currentCreditsText.style.position = 'absolute';
currentCreditsText.style.top = '5px';
currentCreditsText.style.left = '10px';
currentCreditsText.style.padding = '5px';
currentCreditsText.style.display = 'inline-block';

creditsSubMenu.appendChild(currentCreditsText);

menu.appendChild(creditsButton);
document.body.appendChild(creditsSubMenu);

function toggleCreditsSubMenu() {
    if (creditsSubMenu.style.width === '0px') {
        creditsSubMenu.style.width = '200px';
    } else {
        creditsSubMenu.style.width = '0';
    }
}

const osuButton = document.createElement('img');
osuButton.src = 'https://images.spasibovsem.ru/catalog/original/osu-otzyvy-1470068147.png';
osuButton.alt = 'Osu';
osuButton.style.position = 'absolute';
osuButton.style.top = '145px';
osuButton.style.left = '10px';
osuButton.style.width = '30px';
osuButton.style.height = 'auto';
osuButton.style.cursor = 'crosshair';
osuButton.addEventListener('click', function() {
    window.location.href = 'https://osu.ppy.sh/users/35576054';
});

menu.appendChild(osuButton);

const friendsButton = document.createElement('img');
friendsButton.src = 'https://cdn0.iconfinder.com/data/icons/simple-seo-and-internet-icons/512/social_media_marketing-1024.png';
friendsButton.alt = 'Friends';
friendsButton.style.position = 'absolute';
friendsButton.style.top = '190px';
friendsButton.style.left = '10px';
friendsButton.style.width = '30px';
friendsButton.style.height = 'auto';
friendsButton.style.cursor = 'pointer';
friendsButton.addEventListener('click', function() {
    alert("Sorry, but this Feature Works in Progress!");
});

menu.appendChild(friendsButton);

    const subMenu = document.createElement('div');
    subMenu.setAttribute('id', 'subMenu');
    subMenu.style.position = 'absolute';
    subMenu.style.top = '0';
    subMenu.style.left = '50px';
    subMenu.style.width = '0';
    subMenu.style.height = '67px';
    subMenu.style.background = 'rgba(0, 0, 0, 0.7)';
    subMenu.style.transition = 'width 0.5s';
    subMenu.style.overflow = 'hidden';

    const colorPickerButton = document.createElement('div');
    colorPickerButton.style.display = 'flex';
    colorPickerButton.style.alignItems = 'center';
    colorPickerButton.style.cursor = 'pointer';
    colorPickerButton.style.padding = '5px';
    colorPickerButton.style.borderBottom = '1px solid #ccc';
    colorPickerButton.textContent = 'Change everybody\'s nick color (clientside)';
    colorPickerButton.style.color = '#ffffff';

    const colorPicker = document.createElement('input');
    colorPicker.setAttribute('type', 'color');
    colorPicker.style.width = '30px';
    colorPicker.style.height = '30px';
    colorPicker.style.border = 'none';
    colorPicker.style.borderRadius = '0';
    colorPicker.style.marginLeft = '10px';

    colorPicker.addEventListener('change', function(event) {
        const newColor = event.target.value;
        changeNickColor(newColor);
    });

    colorPickerButton.appendChild(colorPicker);

    subMenu.appendChild(colorPickerButton);

    menu.appendChild(settingsButton);
    document.body.appendChild(menu);
    document.body.appendChild(subMenu);

    function toggleSubMenu() {
        if (subMenu.style.width === '0px') {
            subMenu.style.width = '200px';
        } else {
            subMenu.style.width = '0';
        }
    }

    function changeNickColor(newColor) {
        const chatMessages = document.querySelectorAll('.chat-message-sender');
        chatMessages.forEach(function(message) {
            message.style.color = newColor;
        });
    }

    document.addEventListener('mousemove', function(event) {
        if (event.clientX < 20) {
            menu.style.display = 'block';
            menu.style.width = '150px';
        } else {
            menu.style.width = '50px';
        }
    });

// EtherCD's Map Filling for Beauty
    window.EvadesME = {
        vars: {
            worlds: {
                'Central Core': ['#425a6d', 0.1],
                //'Catastrophic Core': ['#B00B1E', 0.1, () => Math.abs(Math.sin(Date.now() / 1000) * 0.15)],
                'Haunted Halls': ['#664B00', 0.1],
                'Peculiar Pyramid': ['#666600', 0.1],
                'Wacky Wonderland': ['#870080', 0.1],
                'Glacial Gorge': ['#005668', 0.1],
                'Vicious Valley': ['#4d6b40', 0.1],
                'Humongous Hollow': ['#663900', 0.1],
                'Elite Expanse': ['#2a3b4f', 0.1],
                'Endless Echo': ['#4168c4', 0.1],
                'Dangerous District': ['#680000', 0.1],
                'Quiet Quarry': ['#425a6d', 0.1],
                'Monumental Migration': ['#470066', 0.1],
                'Ominous Occult': ['#63838e', 0.1],
                'Frozen Fjord': ['#27494f', 0.1],
                'Restless Ridge': ['#a88b64', 0.1],
                'Toxic Territory': ['#5c5c5c', 0.1],
                'Magnetic Monopole': ['#bf00ff', 0.1],
                'Burning Bunker': ['#cc0000', 0.1],
                'Grand Garden': ['#6a9c49', 0.1],
                'Mysterious Mansion': ['#9c0ec7', 0.1],
                'Cyber Castle': ['#21bad9', 0.1],
                'Shifting Sands': ['#c88241', 0.1],
                'Infinite Inferno': ['#9b0606', 0.1],
                'Coupled Corridors': ['#bcad59', 0.1],
                'Withering Wasteland': ['#c45945', 0.1],
                'Dusty Depths': ['#825B37', 0.1],
            },
            worldsKeys: [],
        },

        replaces: [],

        addReplace(a, b) {
            this.replaces.push([a, b]);
        },

        addReplaces() {
            this.addReplace(
                /prepareCanvas\(\w\)\{[\w\d\$="'.,;#?:\s\(\)]+\}/,
                `prepareCanvas(e) {
                  this.chat.style.visibility = 'visible';
                  this.leaderboard.style.visibility = 'visible';
                  this.context.fillStyle = '#333';
                  this.context.fillRect(0, 0, this.context.canvas.width, this.context.canvas.height);
                  if (window.EvadesME.vars.worldsKeys.includes(e.area.regionName)) {
                    this.context.fillStyle = window.EvadesME.vars.worlds[e.area.regionName][0];
                    this.context.globalAlpha = window.EvadesME.vars.worlds[e.area.regionName][2]
                      ? window.EvadesME.vars.worlds[e.area.regionName][2]()
                      : window.EvadesME.vars.worlds[e.area.regionName][1];
                    this.context.fillRect(0, 0, this.context.canvas.width, this.context.canvas.height);
                    this.context.globalAlpha = 1;
                  }
                  this.camera.centerOn(e.self.entity);
                }`
            );
            // this.addReplace(/=['"]#006b2c['"]/, `="#6B0063"`); // #006b66
            // this.addReplace(/=['"]#00ff6b['"]/, `="#e500ff"`); // #00fff4
        },

        init() {
            this.vars.worldsKeys = Object.keys(this.vars.worlds);
            this.addReplaces();
        },

        insertCode() {
            // From script by @Irudis: Evades Helper
            // commenting from alertix: HMMMM????? hacker??🤨
            let elem = Array.from(document.querySelectorAll('script')).filter(
                a => a.type === 'module' && a.src.match(/\/index\.[0-9a-f]{8}\.js/)
            )[0];
            if (!elem) return;
            if (!navigator.userAgent.includes('Firefox')) elem.remove();
            let src = elem.src;

            let req = new XMLHttpRequest();
            req.open('GET', src, false);
            req.send();
            let code = req.response;
    for (const r in this.replaces) code = code.replace(this.replaces[r][0], this.replaces[r][1]);

    let nScr = document.createElement('script');
    nScr.setAttribute('type', 'module');
    nScr.innerHTML = code;
    document.body.appendChild(nScr);
    console.log('Evades More Experience was loaded!');
  },

// idk why did ethercd put that
  asAddonForTSMod() {
    console.log('Sorry, Evades More Experience is not working with TS-Mod');
  },
};

window.EvadesME.init();
if (!window.tsmod) window.EvadesME.insertCode();
else window.EvadesME.asAddonForTSMod();
        console.log("Script for evades.online is running.");
    }

    if (window.location.href.startsWith("https://evades.io/")) {
    GM_addStyle("body { background-image: url(https://u.cubeupload.com/FailureEvades/gotresbge.png); font-family: Verdana,Arial,Times,serif; }");
    GM_addStyle(".title-image { width: 374px; height: 210px; background-image: url('https://u.cubeupload.com/FailureEvades/imageremovebgpreview.png'); background-repeat: no-repeat; background-size: contain; margin: 0 auto; display: block; }");
    GM_addStyle(".hall-of-fame { width: 350px; color: #fff; border: 1px solid #585858; border-radius: 5px; margin: 20px auto 0; padding: 6px; }");
    GM_addStyle(".button { color: #fff;cursor: pointer;background-color: #000080;border: none;border-radius: 5px;margin: 4px 2px;padding: 8px 12px;font-size: 15px;display: block; }");
    GM_addStyle(".button:hover { background: #323299; }");
    GM_addStyle(".button:disabled { cursor: default; color: #fff;background-color: #00004c; }");
    GM_addStyle(".hero-select-heroes-container { width: 2000px;height: auto;flex-wrap: wrap;justify-content: center;margin: 25px auto 0 -410px;display: flex; overflow-y: visible; }");
    GM_addStyle(".choose-your-hero-image { width: 500px;height: 100px;background-image: url(https://u.cubeupload.com/FailureEvades/f7eimageremovebgpreview.png);background-size: contain;margin: 0 auto; }");
    GM_addStyle(".quick-play-button { width: 232px;height: 70px;text-align: center;margin: 0 auto 7px;font-size: 30px;line-height: 70px;display: block; }");
    GM_addStyle(".server-list-how-to-play-container { text-align: center;margin: 0 auto;display: block; }");
    GM_addStyle(".server-list-button { width: 100px;height: 20px;text-align: center;border-radius: 0;margin-right: 5px;line-height: 20px;display: inline-block; }");
    GM_addStyle(".how-to-play-button { width: 100px;height: 20px;text-align: center;border-radius: 0;line-height: 20px;display: inline-block; }");
    GM_addStyle(".menu-back-button { width: 100px;text-align: center;clear: both;margin: 20px auto;display: block; }");
    GM_addStyle(".game-servers-list { text-align: center;width: 885px;margin: 0 auto; }");
    GM_addStyle(".game-server { color: #fff;cursor: pointer;text-align: center;width: 150px;background-color: #000080;border: none;border-radius: 5px;margin: 10px;padding: 8px;font-size: 15px;line-height: 25px; display: inline-block; }");
    GM_addStyle(".game-server:hover { background: #323299; }");
    GM_addStyle(".results-play-again { width: 150px;text-align: center;margin: 50px auto 0;font-size: 25px; }");
    GM_addStyle(".collection-title { text-align: center;margin: 10px;font-size: 23px;color: lightgrey; }");
    GM_addStyle(".collection { width: 1000px;background-color: #292929c4;border-radius: 35px;flex-wrap: wrap;justify-content: center;align-items: flex-start;margin: 0 auto;padding: 10px;display: flex; }");
    GM_addStyle(".accessory { width: 120px;padding: 15px; }");
    GM_addStyle(".accessory img { width: 70px;height: 70px;border: 1px solid #e2e2e240; }");
    GM_addStyle("; }");
    GM_addStyle("; }");
    GM_addStyle("; }");

    const menu = document.createElement('div');
    menu.setAttribute('id', 'customMenu');
    menu.style.position = 'fixed';
    menu.style.top = '50%';
    menu.style.left = '0';
    menu.style.transform = 'translateY(-50%)';
    menu.style.background = 'rgba(0, 0, 0, 0.7)';
    menu.style.width = '50px';
    menu.style.height = '100vh';
    menu.style.display = 'block';
    menu.style.transition = 'width 0.5s';

    const settingsButton = document.createElement('img');
    settingsButton.src = 'https://evades.io/options.8b56ab3c.png';
    settingsButton.alt = 'Settings';
    settingsButton.style.position = 'absolute';
    settingsButton.style.top = '10px';
    settingsButton.style.left = '10px';
    settingsButton.style.width = '30px';
    settingsButton.style.height = 'auto';
    settingsButton.style.cursor = 'pointer';
    settingsButton.addEventListener('click', function() {
        toggleSubMenu();
    });

const cursorChangerButton = document.createElement('img');
cursorChangerButton.src = 'https://u.cubeupload.com/FailureEvades/CursorChanger.png';
cursorChangerButton.alt = 'Cursor Changer';
cursorChangerButton.style.position = 'absolute';
cursorChangerButton.style.top = '55px';
cursorChangerButton.style.left = '10px';
cursorChangerButton.style.width = '30px';
cursorChangerButton.style.height = 'auto';
cursorChangerButton.style.cursor = 'pointer';
cursorChangerButton.addEventListener('click', function() {
    toggleCursorChangerSubMenu();
});

const cursorChangerSubMenu = document.createElement('div');
cursorChangerSubMenu.setAttribute('id', 'cursorChangerSubMenu');
cursorChangerSubMenu.style.position = 'absolute';
cursorChangerSubMenu.style.top = '55px';
cursorChangerSubMenu.style.left = '50px';
cursorChangerSubMenu.style.width = '0';
cursorChangerSubMenu.style.height = '70px';
cursorChangerSubMenu.style.background = 'rgba(0, 0, 0, 0.7)';
cursorChangerSubMenu.style.transition = 'width 0.5s';
cursorChangerSubMenu.style.overflow = 'hidden';

const changeCursorButton = document.createElement('img');
changeCursorButton.src = 'https://u.cubeupload.com/FailureEvades/arrowIcon.png';
changeCursorButton.alt = 'Change Cursor';
changeCursorButton.style.color = '#ffffff';
changeCursorButton.style.position = 'absolute';
changeCursorButton.style.top = '5px';
changeCursorButton.style.left = '20px';
changeCursorButton.style.width = '20px';
changeCursorButton.style.height = 'auto';
changeCursorButton.style.cursor = 'pointer';
changeCursorButton.addEventListener('click', function() {
    changeCursor();
});

const currentCursorText = document.createElement('div');
currentCursorText.textContent = 'Current Cursor: Normal';
currentCursorText.style.color = '#ffffff';
currentCursorText.style.position = 'absolute';
currentCursorText.style.top = '5px';
currentCursorText.style.left = '50px';
currentCursorText.style.padding = '5px';
currentCursorText.style.display = 'inline-block';


let currentCursor = 'normal';

cursorChangerSubMenu.appendChild(currentCursorText);
cursorChangerSubMenu.appendChild(changeCursorButton);

function changeCursor() {
    const body = document.querySelector('body');
    if (currentCursor === 'normal') {
        body.style.cursor = 'crosshair';
        currentCursorText.textContent = 'Current Cursor: Crosshair';
        currentCursor = 'crosshair';
    } else {
        body.style.cursor = 'auto';
        currentCursorText.textContent = 'Current Cursor: Normal';
        currentCursor = 'normal';
    }
}

menu.appendChild(cursorChangerButton);
document.body.appendChild(cursorChangerSubMenu);

function toggleCursorChangerSubMenu() {
    if (cursorChangerSubMenu.style.width === '0px') {
        cursorChangerSubMenu.style.width = '200px';
    } else {
        cursorChangerSubMenu.style.width = '0';
    }
}

const creditsButton = document.createElement('img');
creditsButton.src = 'https://evades.io/question.bc02e04b.png';
creditsButton.alt = 'Credits';
creditsButton.style.position = 'absolute';
creditsButton.style.top = '100px';
creditsButton.style.left = '10px';
creditsButton.style.width = '30px';
creditsButton.style.height = 'auto';
creditsButton.style.cursor = 'pointer';
creditsButton.addEventListener('click', function() {
    toggleCreditsSubMenu();
});

const creditsSubMenu = document.createElement('div');
creditsSubMenu.setAttribute('id', 'creditsSubMenu');
creditsSubMenu.style.position = 'absolute';
creditsSubMenu.style.top = '100px';
creditsSubMenu.style.left = '50px';
creditsSubMenu.style.width = '0px';
creditsSubMenu.style.height = '150px';
creditsSubMenu.style.background = 'rgba(0, 0, 0, 0.7)';
creditsSubMenu.style.transition = 'width 1.5s';
creditsSubMenu.style.overflow = 'hidden';

const currentCreditsText = document.createElement('div');
currentCreditsText.textContent = 'Thanks to: EtherCD(aka ✺Mistake✺)'
currentCreditsText.style.color = '#ffffff';
currentCreditsText.style.position = 'absolute';
currentCreditsText.style.top = '5px';
currentCreditsText.style.left = '10px';
currentCreditsText.style.padding = '5px';
currentCreditsText.style.display = 'inline-block';

creditsSubMenu.appendChild(currentCreditsText);

menu.appendChild(creditsButton);
document.body.appendChild(creditsSubMenu);

function toggleCreditsSubMenu() {
    if (creditsSubMenu.style.width === '0px') {
        creditsSubMenu.style.width = '200px';
    } else {
        creditsSubMenu.style.width = '0';
    }
}

const osuButton = document.createElement('img');
osuButton.src = 'https://images.spasibovsem.ru/catalog/original/osu-otzyvy-1470068147.png';
osuButton.alt = 'Osu';
osuButton.style.position = 'absolute';
osuButton.style.top = '145px';
osuButton.style.left = '10px';
osuButton.style.width = '30px';
osuButton.style.height = 'auto';
osuButton.style.cursor = 'crosshair';
osuButton.addEventListener('click', function() {
    window.location.href = 'https://osu.ppy.sh/users/35576054';
});

menu.appendChild(osuButton);

const friendsButton = document.createElement('img');
friendsButton.src = 'https://cdn0.iconfinder.com/data/icons/simple-seo-and-internet-icons/512/social_media_marketing-1024.png';
friendsButton.alt = 'Friends';
friendsButton.style.position = 'absolute';
friendsButton.style.top = '190px';
friendsButton.style.left = '10px';
friendsButton.style.width = '30px';
friendsButton.style.height = 'auto';
friendsButton.style.cursor = 'pointer';
friendsButton.addEventListener('click', function() {
    alert("Sorry, but this Feature Works in Progress!");
});

menu.appendChild(friendsButton);

    const subMenu = document.createElement('div');
    subMenu.setAttribute('id', 'subMenu');
    subMenu.style.position = 'absolute';
    subMenu.style.top = '0';
    subMenu.style.left = '50px';
    subMenu.style.width = '0';
    subMenu.style.height = '67px';
    subMenu.style.background = 'rgba(0, 0, 0, 0.7)';
    subMenu.style.transition = 'width 0.5s';
    subMenu.style.overflow = 'hidden';

    const colorPickerButton = document.createElement('div');
    colorPickerButton.style.display = 'flex';
    colorPickerButton.style.alignItems = 'center';
    colorPickerButton.style.cursor = 'pointer';
    colorPickerButton.style.padding = '5px';
    colorPickerButton.style.borderBottom = '1px solid #ccc';
    colorPickerButton.textContent = 'Change everybody\'s nick color (clientside)';
    colorPickerButton.style.color = '#ffffff';

    const colorPicker = document.createElement('input');
    colorPicker.setAttribute('type', 'color');
    colorPicker.style.width = '30px';
    colorPicker.style.height = '30px';
    colorPicker.style.border = 'none';
    colorPicker.style.borderRadius = '0';
    colorPicker.style.marginLeft = '10px';

    colorPicker.addEventListener('change', function(event) {
        const newColor = event.target.value;
        changeNickColor(newColor);
    });

    colorPickerButton.appendChild(colorPicker);

    subMenu.appendChild(colorPickerButton);

    menu.appendChild(settingsButton);
    document.body.appendChild(menu);
    document.body.appendChild(subMenu);

    function toggleSubMenu() {
        if (subMenu.style.width === '0px') {
            subMenu.style.width = '200px';
        } else {
            subMenu.style.width = '0';
        }
    }

    function changeNickColor(newColor) {
        const chatMessages = document.querySelectorAll('.chat-message-sender');
        chatMessages.forEach(function(message) {
            message.style.color = newColor;
        });
    }

    document.addEventListener('mousemove', function(event) {
        if (event.clientX < 20) {
            menu.style.display = 'block';
            menu.style.width = '150px';
        } else {
            menu.style.width = '50px';
        }
    });

// EtherCD's Map Filling for Beauty
    window.EvadesME = {
        vars: {
            worlds: {
                'Central Core': ['#425a6d', 0.1],
                //'Catastrophic Core': ['#B00B1E', 0.1, () => Math.abs(Math.sin(Date.now() / 1000) * 0.15)],
                'Haunted Halls': ['#664B00', 0.1],
                'Peculiar Pyramid': ['#666600', 0.1],
                'Wacky Wonderland': ['#870080', 0.1],
                'Glacial Gorge': ['#005668', 0.1],
                'Vicious Valley': ['#4d6b40', 0.1],
                'Humongous Hollow': ['#663900', 0.1],
                'Elite Expanse': ['#2a3b4f', 0.1],
                'Endless Echo': ['#4168c4', 0.1],
                'Dangerous District': ['#680000', 0.1],
                'Quiet Quarry': ['#425a6d', 0.1],
                'Monumental Migration': ['#470066', 0.1],
                'Ominous Occult': ['#63838e', 0.1],
                'Frozen Fjord': ['#27494f', 0.1],
                'Restless Ridge': ['#a88b64', 0.1],
                'Toxic Territory': ['#5c5c5c', 0.1],
                'Magnetic Monopole': ['#bf00ff', 0.1],
                'Burning Bunker': ['#cc0000', 0.1],
                'Grand Garden': ['#6a9c49', 0.1],
                'Mysterious Mansion': ['#9c0ec7', 0.1],
                'Cyber Castle': ['#21bad9', 0.1],
                'Shifting Sands': ['#c88241', 0.1],
                'Infinite Inferno': ['#9b0606', 0.1],
                'Coupled Corridors': ['#bcad59', 0.1],
                'Withering Wasteland': ['#c45945', 0.1],
                'Dusty Depths': ['#825B37', 0.1],
            },
            worldsKeys: [],
        },

        replaces: [],

        addReplace(a, b) {
            this.replaces.push([a, b]);
        },

        addReplaces() {
            this.addReplace(
                /prepareCanvas\(\w\)\{[\w\d\$="'.,;#?:\s\(\)]+\}/,
                `prepareCanvas(e) {
                  this.chat.style.visibility = 'visible';
                  this.leaderboard.style.visibility = 'visible';
                  this.context.fillStyle = '#333';
                  this.context.fillRect(0, 0, this.context.canvas.width, this.context.canvas.height);
                  if (window.EvadesME.vars.worldsKeys.includes(e.area.regionName)) {
                    this.context.fillStyle = window.EvadesME.vars.worlds[e.area.regionName][0];
                    this.context.globalAlpha = window.EvadesME.vars.worlds[e.area.regionName][2]
                      ? window.EvadesME.vars.worlds[e.area.regionName][2]()
                      : window.EvadesME.vars.worlds[e.area.regionName][1];
                    this.context.fillRect(0, 0, this.context.canvas.width, this.context.canvas.height);
                    this.context.globalAlpha = 1;
                  }
                  this.camera.centerOn(e.self.entity);
                }`
            );
            // this.addReplace(/=['"]#006b2c['"]/, `="#6B0063"`); // #006b66
            // this.addReplace(/=['"]#00ff6b['"]/, `="#e500ff"`); // #00fff4
        },

        init() {
            this.vars.worldsKeys = Object.keys(this.vars.worlds);
            this.addReplaces();
        },

        insertCode() {
            // From script by @Irudis: Evades Helper
            // commenting from alertix: HMMMM????? hacker??🤨
            let elem = Array.from(document.querySelectorAll('script')).filter(
                a => a.type === 'module' && a.src.match(/\/index\.[0-9a-f]{8}\.js/)
            )[0];
            if (!elem) return;
            if (!navigator.userAgent.includes('Firefox')) elem.remove();
            let src = elem.src;

            let req = new XMLHttpRequest();
            req.open('GET', src, false);
            req.send();
            let code = req.response;
    for (const r in this.replaces) code = code.replace(this.replaces[r][0], this.replaces[r][1]);

    let nScr = document.createElement('script');
    nScr.setAttribute('type', 'module');
    nScr.innerHTML = code;
    document.body.appendChild(nScr);
    console.log('Evades More Experience was loaded!');
  },

// idk why did ethercd put that
  asAddonForTSMod() {
    console.log('Sorry, Evades More Experience is not working with TS-Mod');
  },
};

window.EvadesME.init();
if (!window.tsmod) window.EvadesME.insertCode();
else window.EvadesME.asAddonForTSMod();
        function setZoomTo100() {
            document.body.style.zoom = "100%";
        }

        window.onload = setZoomTo100;

        const observer = new MutationObserver(setZoomTo100);
        observer.observe(document.body, {
            attributes: true,
            childList: true,
            subtree: true
        });
        console.log("Script for evades.io is running.");
    }
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。