Map-Making Hide UI

lets you hide all ui in the streetview pano with H

Mint 2025.10.25.. Lásd a legutóbbi verzió

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Map-Making Hide UI
// @namespace    https://greasyfork.org/en/users/1501889
// @version      1.61
// @description  lets you hide all ui in the streetview pano with H
// @author       Clemens
// @match        https://*.map-making.app/*
// @icon         https://map-making.app/favicon.ico
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const style = document.createElement('style');
    style.textContent = `
        /* This class will be toggled on the control containers to hide them completely */
        .map-controls-hidden {
            display: none !important;
        }
    `;
    document.head.appendChild(style);

    function findRootControlContainer() {
        return document.querySelector('.location-preview__panorama');
    }

    function toggleControls() {
        const rootContainer = findRootControlContainer();
        if (!rootContainer) {
            return;
        }

        const appControlsContainer = rootContainer.querySelector('.embed-controls');

        const googleControlSelectors = [
            '.gm-style-cc',
            '.gmnoprint',
            '.gm-svpc',
            '.gm-bundled-control',
            '.LGLeeN-keyboard-shortcuts-view',
            '.gm-iv-container',
            '.SLHIdE-sv-links-control'
        ];

        const elementsToToggle = [];

        if (appControlsContainer) {
            elementsToToggle.push(appControlsContainer);
        }

        rootContainer.querySelectorAll(googleControlSelectors.join(', ')).forEach(el => {
            elementsToToggle.push(el);
        });

        const panoViewport = rootContainer.querySelector('.gm-style div[tabindex="0"]');

        if (panoViewport) {
            const embeddedUIElements = panoViewport.querySelectorAll('div, svg, a, button, [role="button"]');

            embeddedUIElements.forEach(el => {
                if (el !== panoViewport) {
                    if (el.tagName !== 'CANVAS') {
                         elementsToToggle.push(el);
                    }
                }
            });
        }

        const uniqueControls = [...new Set(elementsToToggle)];

        uniqueControls.forEach(el => {
            el.classList.toggle('map-controls-hidden');
        });
    }


    document.addEventListener('keydown', function(event) {
        if (event.key === 'h' || event.key === 'H') {
            event.preventDefault();
            toggleControls();
        }
    });
})();