Arras.io - Start Menu Modifier

Makes the start menu better to look at

Από την 18/02/2023. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Arras.io - Start Menu Modifier
// @version      1.1
// @description  Makes the start menu better to look at
// @author       Taureon
// @run-at       document-end
// @match        https://arras.io/
// @namespace https://greasyfork.org/users/935758
// ==/UserScript==

//hey arras.io devs, i know you can see this
//please make the server selector larger, i have a large enough monitor to render more

//unused element that takes up space
document.querySelector('.menuTabs').remove();

setInterval(() => {

//i am not sorry that you had to read this code, it was largely funded by ophthalmologists
// https://cdn.discordapp.com/emojis/983734696083075113.png
    try {

let rules = Array.from(Array.from(document.styleSheets).find(x => x.href.includes('arras')).rules),
    Ratio = 'Attachment';

for (let ruleName of [
    '.serverSelector',
    '#startMenuSlidingTrigger',
    '.slider',
    '.shadowScroll',
    '.sliderHolder',
    '.startMenuHolder.changelogHolder',
     '.startMenuHolder',
    '.startMenu',
    '#startMenuWrapper',
    '#patchNotes',
    '.mainWrapper'
]) {
    let style = rules.find(x => x.selectorText == ruleName).style;

if (ruleName == '.serverSelector'                 ) {
        style.maxHeight = style.height = 'calc(100% - 159px)';
    } else if (ruleName == '.slider'                         ) {
        style.maxHeight = style.height = 'min-content';
    } else if (ruleName == '.sliderHolder' ) {
        style.maxHeight = style.height = 'calc(100% - 50px)';
    } else if (ruleName == '.startMenuHolder'                ) {
       style.maxHeight = style.height = 'calc(100% - 20px)';
    } else if (ruleName == '#startMenuSlidingTrigger'        ) {
        style.padding = (-(0x1 * 0x1f2a + 0x8df * -0x4 + 0x6 * 0xb9) * (-0x236 + -0x102 + -0xd3 * -0xa) + (0x1 * 0xc1d + 0x71 * -0x67 + 0x4205 * 0x1) + -(-0x7f1 + 0x17c + -0x2 * -0x33b) * (0x1f32 + -0x11 * 0x1f9 + 0x3b8 * 0x4)) + 'px';
    } else if (ruleName == '.startMenuHolder.changelogHolder' ) {
    	style.maxHeight = style.height = 'calc(100% - 20px)';
    	style.display = 'block';
    }
if (ruleName == '.startMenu'                ) {
        style.maxHeight = 'calc(100%)';
        style.height = 'calc(100%)';
    } else if (ruleName == '#startMenuWrapper'            ) {
        style.maxHeight = style.height = 'calc(100% - 20px)';
    } else if (ruleName == '#patchNotes'                    ) {
        style.height = style.maxHeight = 'calc(100% - 39px)';
    } else if (ruleName == '.mainWrapper'                    ) {
        style.padding = new Array(Math.floor(Math.PI)).fill(x => "20px").map(y => y()).reduce((a, b) => a + ' ' + b, '20px'); //what the fuck is a .join()
        style.maxHeight = style.height = 'calc(100% - 40px)';
    
}
    switch (ruleName) {
    case '.shadowScroll':
    let L = 'background';
	style[L] = style[L + 'Size'] = style[L + 'Color'] = style[L + 'Repeat'] = style[L + Ratio] = '';
    }
}

//POV: You're using document.querySelector()
// https://youtu.be/mdquYEw36TU
let style = document.querySelector("#startMenuWrapper > div > div.startMenuHolder.mainHolder > div.sliderHolder > div:nth-child(1)").style
style.maxHeight = style.height = 'calc(100% - 315px)';
} catch (err) {}

}, 0b1111101000);