MenelGame - Interface Tweaks

Poprawki wizualne interfejsu - Skróty 20% poniżej Timerów

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name          MenelGame - Interface Tweaks
// @namespace    https://greasyfork.org/en/scripts/575758-menelgame-interface-tweaks
// @version      2.3.1
// @description  Poprawki wizualne interfejsu - Skróty 20% poniżej Timerów
// @author       Arctos + Gemini
// @match        *://*.menelgame.online/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const css = `
        /* 1. Usuniecie marginesu pod zakladkami i nad zestawami */
        .equipment-tabs { 
            margin-bottom: 0px !important; 
        }

        .equipment-presets-section {
            margin-top: 0px !important;
        }

        /* 2. Kontener rzedu narzedzi */
        .equipment-slot-row.row-hustling {
            display: block !important;
            text-align: center !important;
            width: 100% !important;
            overflow: visible !important;
            clear: both !important;
            margin-top: -65px !important; 
            position: relative !important;
            z-index: 10 !important;
            line-height: 0 !important;
            pointer-events: none !important; 
        }

        /* 3. Styl slotow narzedzi */
        .equipment-slot-row.row-hustling .equipment-slot {
            display: inline-block !important;
            float: none !important;
            position: relative !important;
            margin: 0 1% !important;
            vertical-align: top !important;
            pointer-events: auto !important; 
        }

        /* 4. PRZERWA W % */
        .equipment-slot-row.row-hustling .equipment-slot:nth-child(1),
        .equipment-slot-row.row-hustling .equipment-slot:nth-child(2) {
            left: -14% !important;
        }

        .equipment-slot-row.row-hustling .equipment-slot:nth-child(3),
        .equipment-slot-row.row-hustling .equipment-slot:nth-child(4) {
            left: 14% !important;
        }

        /* 5. Warstwy i klikalnosc */
        .equipment-slot {
            z-index: 5 !important;
            pointer-events: auto !important;
        }
        
        [title*="buty"], [title*="Buty"], .equipment-slot {
            pointer-events: auto !important;
        }

        /* 6. POWIEKSZENIE IKONKI KURTKI */
        .avatar-jacket-badge {
            width: 48px !important;
            height: 48px !important;
        }

        .avatar-jacket-icon {
            width: 100% !important;
            height: 100% !important;
        }

        /* 7. WYRÓWNANIE PASKA ZASOBÓW */
        div[style*="background-color: rgba(74, 58, 42, 0.9)"] {
            justify-content: flex-start !important;
            gap: 10px !important;
        }

        div[style*="background-color: rgba(74, 58, 42, 0.9)"] > div:nth-child(2) {
            margin-left: auto !important;
        }

        /* 8. STABILIZACJA ZAKŁADEK BOCZNYCH (35px szerokości) */
        
        /* Timery - Oryginalna pozycja z gry (25%) */
        .timers-pull-tab {
            width: 35px !important; 
            transition: none !important;
            box-shadow: -3px 0 10px rgba(0,0,0,0.5) !important;
        }

        /* Skróty - Ustawione na 55% (czyli 25% timerów + 25% odstępu) */
        .shortcuts-pull-tab {
            width: 35px !important;
            transition: none !important;
            box-shadow: -3px 0 10px rgba(0,0,0,0.5) !important;
            top: 50% !important; 
            bottom: auto !important;
            transform: translateY(-50%) !important;
            border-radius: 8px 0 0 8px !important;
        }

        .timers-pull-tab:hover, .shortcuts-pull-tab:hover {
            width: 35px !important;
            background: linear-gradient(135deg, #a67c52, #8b5a2b) !important;
        }

        .timers-pull-tab-arrow, .shortcuts-pull-tab-icon {
            font-size: 18px !important;
            font-weight: bold !important;
        }
    `;

    const addStyle = () => {
        if (document.getElementById('menel-tweaks-style')) return;
        const style = document.createElement('style');
        style.id = 'menel-tweaks-style';
        style.textContent = css;
        (document.head || document.documentElement).appendChild(style);
    };

    addStyle();
    window.addEventListener('DOMContentLoaded', addStyle);
    
    const observer = new MutationObserver(() => {
        if (!document.getElementById('menel-tweaks-style')) {
            addStyle();
        }
    });
    observer.observe(document.documentElement, { childList: true, subtree: true });
})();