MenelGame - Interface Tweaks

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

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==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 });
})();