Seterra Hack

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

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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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