Skip to content

Instantly share code, notes, and snippets.

@leonbrandt
Last active November 24, 2023 19:03
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save leonbrandt/16b3a70ef70939359357c908e6b0f06d to your computer and use it in GitHub Desktop.
Save leonbrandt/16b3a70ef70939359357c908e6b0f06d to your computer and use it in GitHub Desktop.
Geoguessr cheat (Greasemonkey / Tampermonkey)
// ==UserScript==
// @name Geoguessr Cheat
// @namespace https://www.leonbrandt.com
// @version 2.0.0
// @description Press SHIFT + ALT + G and the location of your current geoguessr game will open in a new tab
// @author Leon Brandt
// @homepage https://www.leonbrandt.com
// @updateURL https://gist.githubusercontent.com/leonbrandt/16b3a70ef70939359357c908e6b0f06d/raw/geoguessr-cheat.user.js
// @match http*://*/*
// @grant none
// @run-at document-idle
// ==/UserScript==
/*
MAKE SURE TO RELOAD PAGE AFTER EVERY ROUND BEFORE PRESSING SHIFT + ALT + G
*/
function getTargetUrl() {
const raw = document.querySelectorAll("#__NEXT_DATA__")[0].text;
const json = JSON.parse(raw);
const rounds = json.props.pageProps.game.rounds;
const currentRound = rounds[rounds.length - 1];
const targetUrl = "https://google.com/maps/place/" + currentRound.lat + "," + currentRound.lng;
return targetUrl;
}
(function() {
'use strict';
document.onkeydown = evt => {
evt = evt || window.event;
if(evt.shiftKey && evt.altKey && evt.keyCode == 71){
window.open(getTargetUrl(), '_blank');
}
};
})();
@Xarond12
Copy link

hello, i'm looking for drawing location on map script. I had something like that but by mistake i removed it

@kisames
Copy link

kisames commented Sep 28, 2022

still works?

@Kein187
Copy link

Kein187 commented Oct 16, 2022

still work?

@LiquIDMeowz
Copy link

does not work

@101cohen
Copy link

Any way you could make it so the tab opens on the other monitor?

@Ivre31
Copy link

Ivre31 commented Feb 26, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment