Greasy Fork

Gota.io Optimiser

Tidies up Gota... a little bit.

目前为 2020-01-29 提交的版本。查看 最新版本

// ==UserScript==
// @name         Gota.io Optimiser
// @namespace    https://gota.io/web/*
// @version      0.3
// @description  Tidies up Gota... a little bit.
// @author       AlexHGaming
// @match        https://gota.io/web/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // Assign IDs to classes
    document.getElementsByClassName(`options-container`)[0].id = "options";
    document.getElementsByClassName(`main-bottom-stats interface-color`)[0].id = "stats";
    document.getElementsByClassName(`error-banner`)[0].id = "banner";
    document.getElementsByClassName(`main-bottom-links`)[0].id = "adv";
    document.getElementsByClassName(`main-rb-title`)[0].id = "proftxt";
    document.getElementsByClassName(`current-status`)[0].id = "status";
    document.getElementsByClassName(`main-version`)[0].id = "version";

    // Update styles
    document.getElementById(`main-rb`).style = `display: none`;
    document.getElementById(`adv`).style = `display: none`;
    document.getElementById(`stats`).style = `display: none`;
    document.getElementById(`status`).style = `display: none`;
    document.getElementById(`proftxt`).style = `font-size: 21.3px`;
    document.getElementById(`main`).style = `background-image: url('https://cdn.discordapp.com/attachments/648261831688716353/671832801716338693/20200128_234321.jpg')`;
    document.getElementById(`servers-body-eu`).style = `background-color: transparent`;
    document.getElementById(`servers-body-na`).style = `background-color: transparent`;
    document.getElementById(`servers-body-ap`).style = `background-color: transparent`;

    // Update content
    document.getElementById(`banner`).innerHTML = `An error has occured. If you can still play, just click this red box. Try these solutions to fix your error: disable the extension, clear your cache, try a different browser etc. If none of these work, please contact someone in the <a href = 'discord.gg/gota'>Gota Discord</a>.`;
    document.getElementById(`proftxt`).innerHTML = `Gota Account`;
    document.getElementById(`version`).innerHTML += ` | Extension Version: 0.3`;
    document.getElementById(`proftxt`).innerHTML += `<div class="divider title-divider"></div>`;
    document.getElementById(`main-left`).innerHTML += `<br><br><img src = "https://discordapp.com/api/guilds/647909290061070366/embed.png?style=banner2" onclick = "window.open('https://discord.gg/yHE3NSb')">`;
})();