Seterra Hack

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Seterra Hack
// @namespace    http://tampermonkey.net/
// @license      MIT
// @version      1.2
// @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==

setInterval(() => {
    // [class^='container_sizeMedium']:nth-child(2)
    const gameHeader = document.querySelector("#__next [class^='seterra'] [class^='seterra_content'] [class^='seterra_main'] [class^='game-container'] [class^='game-container'] [class^='game-page_gameAreaWrapper'] [class^='game-area_gameWrapper'] [class^='game-header_wrapper']");
    if (gameHeader) {
        const currentQuestionId = gameHeader.getAttribute('data-current-question-id').replace(/ /g, "_");
        const correct = document.querySelector("#".concat(currentQuestionId));
        if (correct) {
            correct.addEventListener('click', function() {
                correct.style.setProperty("--fill-color", "white");
            });
            correct.style.setProperty("--fill-color", "black");
            const correctDot = correct.querySelector("[class^='hitbox-dot']");
            if (correctDot) {
                correctDot.addEventListener('click', function() {
                    correctDot.style.display = "none";
                });
            correctDot.style.fill = "black";
            }
        } else {
            console.log("current qId not found");
        }
    } else {
        console.log("game element not found");
    }

}, 150);