Seterra Hack

simple hack for seterra. colours the correct country/location in black, then white when clicked.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Seterra Hack
// @namespace    http://tampermonkey.net/
// @license      MIT
// @version      2.0
// @description  simple hack for seterra. colours the correct country/location in black, then white when clicked.
// @author       azzlam
// @match        https://www.geoguessr.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=geoguessr.com
// @grant        none
// ==/UserScript==
 
(function() {
    'use strict';
    const style = document.createElement('style');
    document.head.appendChild(style);
 
    setInterval(() => {
        const gameHeader = document.querySelector('[data-qa="game-map-header"]');
        
        if (gameHeader) {
            const currentQuestionId = gameHeader.getAttribute('data-current-question-id');
            
            if (currentQuestionId) {
                // Escape quotes in the ID just in case to prevent CSS errors
                const safeId = currentQuestionId.replace(/"/g, '\\"');
                
                style.textContent = `
                    [id="${safeId}"] {
                        --fill-color: black !important;
                    }
                    [id="${safeId}"] [class^='hitbox-dot'] {
                        fill: black !important;
                    }
                `;
            } else {
                // Clear the style if there is no active question
                style.textContent = "";
            }
        } else {
            // Clear the style if the game isn't active
            style.textContent = "";
        }
 
    }, 150);
})();