Antipoder

Takes your GeoGuessr guess and flips it to the antipode

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

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

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

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

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

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

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

Advertisement:

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

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

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

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

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

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

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

Advertisement:

// ==UserScript==
// @name         Antipoder
// @description  Takes your GeoGuessr guess and flips it to the antipode
// @license      MIT
// @namespace    http://tampermonkey.net/
// @version      2026-05-09
// @match        *://*.geoguessr.com/*
// @run-at       document-start
// @grant        unsafeWindow
// ==/UserScript==

let gcoords = [ 0, 0 ];

function calculateIncorrectedLatLong( latitude, longitude ) {
    latitude = -1 * latitude;
    longitude = ( 180 - Math.abs( longitude ) ) * ( longitude > 0 ? -1 : 1 );
	return { latitude, longitude };
}

const originalFetch = unsafeWindow.fetch;

const updateButton = () => {
	const button = document.querySelector('button[data-qa=perform-guess]');
	if ( ! button || button.disabled ) return;

	button.style.background = '#6817ae';
	button.innerText = 'GUESS AT ANTIPODE';
};
setInterval( updateButton, 250 );

unsafeWindow.fetch = new Proxy( originalFetch, {
	apply: function (target, that, args) {

		let [resource, config] = args;

        if (
            resource.match && (
                resource?.match( /^https:\/\/www\.geoguessr\.com\/api\/v\d\/games\// ) ||
                resource?.match( /^https:\/\/[^\.]+\.geoguessr\.com\/.*?\/(guess|pin)$/ )
            )
        ) {
            if ( config?.body ) {
                const orig = JSON.parse( config.body );
                if ( orig.lat && orig.lng ) {
                    console.log( orig );
                    const incorrected = calculateIncorrectedLatLong( orig.lat, orig.lng );
                    if ( incorrected.latitude && incorrected.longitude ) {
                        config.body = JSON.stringify( {
                            ...orig,
                            lat: incorrected.latitude,
                            lng: incorrected.longitude,
                        } );
                    }
                }
            }
        }

		const promise = Reflect.apply(target, that, args);

		return promise;
	}
} );