Seterra Hack

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

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

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