Geoguessr Hide Results

Hide results of guesses and opponents in challenges

As of 17.07.2025. See ბოლო ვერსია.

// ==UserScript==
// @name         Geoguessr Hide Results
// @namespace    http://tampermonkey.net/
// @author       BrainyGPT
// @version      1.2
// @description  Hide results of guesses and opponents in challenges
// @match        https://www.geoguessr.com/*
// @icon         https://i.imgur.com/IG8yPEV.png
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function hideElements() {
        // Hide leaderboard
        document.querySelectorAll('.current-standings_container__vzyTJ').forEach(el => el.style.display = 'none');

        // Hide opponent markers (not your own)
        document.querySelectorAll('div.map-pin_mapPin__vG6pA.map-pin_largeMapPin__0O81H[data-qa="opponent-marker"]').forEach(el => el.style.display = 'none');

        // Hide correct location marker
        document.querySelectorAll('div.map-pin_mapPin__vG6pA.map-pin_clickable__wa8cr.map-pin_largeMapPin__0O81H[data-qa="correct-location-marker"]').forEach(el => el.style.display = 'none');

        // Hide result UI text and buttons
        document.querySelectorAll('.round-result_pointsIndicatorWrapper__7JxD_, .round-result_distanceIndicatorWrapper__qNO6y, .result_buttons__co3Zc').forEach(el => el.style.display = 'none');

        // Hide results table
        document.querySelectorAll('.results_table__Z7k_U').forEach(el => el.style.display = 'none');

        // Hide safe dashed-line overlay (z-index: 101 and exact position)
        document.querySelectorAll('div[style]').forEach(el => {
            const style = el.getAttribute('style');
            if (
                style.includes('z-index: 101') &&
                style.includes('position: absolute') &&
                style.includes('left: 0px') &&
                style.includes('top: 0px')
            ) {
                el.style.display = 'none';
            }
        });
    }

    // Initial sweep
    hideElements();

    // Watch for new overlays or UI showing up
    const observer = new MutationObserver(() => {
        hideElements();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true,
    });
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。