Lynn Reset Position

Reset posisi menu, dock, dan location Lynn yang nyangkut di layar

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Lynn Reset Position
// @namespace    lynn-reset-position
// @version      1.0.0
// @description  Reset posisi menu, dock, dan location Lynn yang nyangkut di layar
// @match        https://www.geoguessr.com/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function () {
    'use strict';

    const keys = [
        // menu position / size dari patch lama dan baru
        'lynn_menu_left_v1',
        'lynn_menu_top_v1',
        'lynn_menu_left_v2',
        'lynn_menu_top_v2',
        'lynn_menu_left_v3',
        'lynn_menu_top_v3',
        'lynn_menu_pos_clean_v1',
        'lynn_menu_pos_clean_v2',
        'lynn_menu_pos_clean_v3',
        'lynn_clean_menu_pos_v1',
        'lynn_clean_menu_pos_v2',
        'lynn_clean_menu_pos_v3',
        'lynn_force_menu_left_v1',
        'lynn_force_menu_top_v1',
        'lynn_force_menu_size_v1',
        'lynn_menu_size_clean_v1',
        'lynn_menu_size_clean_v2',
        'lynn_menu_size_clean_v3',

        // dock / tombol samping
        'lynn_buttons_left',
        'lynn_buttons_top',
        'lynn_buttons_left_v2',
        'lynn_buttons_top_v2',
        'lynn_buttons_left_v3',
        'lynn_buttons_top_v3',
        'lynn_panel_left_v1',
        'lynn_panel_top_v1',
        'lynn_panel_left_v2',
        'lynn_panel_top_v2',
        'lynn_panel_left_v3',
        'lynn_panel_top_v3',
        'lynn_dock_pos_clean_v1',
        'lynn_dock_pos_clean_v2',
        'lynn_dock_pos_clean_v3',

        // location panel
        'lynn_loc_left',
        'lynn_loc_top',
        'lynn_loc_left_v1',
        'lynn_loc_top_v1',
        'lynn_loc_left_v2',
        'lynn_loc_top_v2',
        'lynn_loc_left_v3',
        'lynn_loc_top_v3',
        'lynn_loc_pos_clean_v1',
        'lynn_loc_pos_clean_v2',
        'lynn_loc_pos_clean_v3',
        'lynn_loc_min_v1',
        'lynn_loc_min_v2',
        'lynn_loc_min_v3',
        'lynn_loc_scale',
        'lynn_loc_scale_v1',
        'lynn_loc_scale_v2',
        'lynn_loc_scale_v3',
        'lynn_loc_scale_clean_v1',
        'lynn_loc_scale_clean_v2',
        'lynn_loc_scale_clean_v3',

        // zoom map
        'lynn_loc_zoom_index_v1',
        'lynn_loc_zoom_index_v2',
        'lynn_loc_zoom_index_v3',
        'lynn_zoom_clean_v1',
        'lynn_zoom_clean_v2',
        'lynn_zoom_clean_v3'
    ];

    keys.forEach(function (key) {
        localStorage.removeItem(key);
    });

    function forceSafePosition() {
        const menu = document.getElementById('lunar-menu');
        if (menu) {
            menu.style.setProperty('left', '10px', 'important');
            menu.style.setProperty('top', '76px', 'important');
            menu.style.setProperty('transform', 'none', 'important');
            menu.style.setProperty('width', 'calc(100vw - 104px)', 'important');
            menu.style.setProperty('height', '545px', 'important');
        }

        const dock =
            document.getElementById('lynn-side-dock') ||
            document.getElementById('lynn-simple3-panel') ||
            document.getElementById('lunar-simple3-panel');

        if (dock) {
            dock.style.setProperty('right', '8px', 'important');
            dock.style.setProperty('top', '245px', 'important');
            dock.style.removeProperty('left');
            dock.style.setProperty('transform', 'none', 'important');
        }

        const loc = document.getElementById('lunar-location-display');
        if (loc) {
            loc.classList.remove('lynn-loc-minimized', 'lunar-loc-minimized-final', 'lunar-loc-minimized-safe');
            loc.style.setProperty('left', '10px', 'important');
            loc.style.setProperty('top', '640px', 'important');
            loc.style.setProperty('transform', 'none', 'important');
        }
    }

    forceSafePosition();
    setTimeout(forceSafePosition, 500);
    setTimeout(forceSafePosition, 1200);
    setTimeout(forceSafePosition, 2500);

    console.log('[Lynn Reset Position] reset selesai. Setelah posisi normal, matikan/hapus script ini.');
})();