// ==UserScript== // @name Hedge Streak Counter (Automated) // @version 1.4.3 // @description Adds a hedge streak counter to the GeoGuessr website. Compatible with country streak counters if both scripts are at least v.1.3.0. // @author victheturtle#5159 // @license MIT // @require https://greasyfork.org/scripts/460322-geoguessr-styles-scan/code/Geoguessr%20Styles%20Scan.js?version=1151654 // @match https://www.geoguessr.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=geoguessr.com // @namespace https://greasyfork.org/users/967692-victheturtle // @grant none // @downloadURL https://update.greasyfork.icu/scripts/452753/Hedge%20Streak%20Counter%20%28Automated%29.user.js // @updateURL https://update.greasyfork.icu/scripts/452753/Hedge%20Streak%20Counter%20%28Automated%29.meta.js // ==/UserScript== // Credits to quarksauce for the original Hedge Streak Counter script const HEDGE_THRESHOLD = 20000; // ^^^^^ You can change the threshold for getting the streak here let streak = parseInt(sessionStorage.getItem("HedgeStreak") || 0, 10); let lastGameId = sessionStorage.getItem("HedgeLastGameId") || ""; function checkGameMode() { return (location.pathname.includes("/game/")); }; var style = document.createElement("style"); document.head.appendChild(style); style.sheet.insertRule("div[class*='round-result_distanceIndicatorWrapper__'] { animation-delay: 0s, 0s; animation-duration: 0s, 0s; grid-area: 1 / 1 / span 1 / span 1; margin-right: 28px }") style.sheet.insertRule("div[class*='round-result_actions__'] { animation-delay: 0s; animation-duration: 0s; grid-area: 2 / 1 / span 1 / span 3; margin: 0px; margin-top: 10px; margin-bottom: 10px }") style.sheet.insertRule("div[class*='round-result_pointsIndicatorWrapper__'] { animation-delay: 0s, 0s; animation-duration: 0s, 0s; grid-area: 1 / 2 / span 1 / span 1; margin-right: 28px }") style.sheet.insertRule("div[class*='map-pin_largeMapPin__'] { height: 2rem; width: 2rem; margin-left: -1rem; margin-top: -1rem }") style.sheet.insertRule("p[class*='round-result_label__'] { display: none }") style.sheet.insertRule("div[class*='results-confetti_wrapper__'] { visibility: hidden }") style.sheet.insertRule("div[class*='round-result_wrapper__'] { align-self: center; display: grid; flex-wrap: wrap }") style.sheet.insertRule("div[class*='result-layout_contentNew__'] { display: flex; justify-content: center }") style.sheet.insertRule("p[class*='standard-final-result_spacebarLabel__'] { display: none }") style.sheet.insertRule("div[class*='standard-final-result_wrapper__'] { align-items: normal; justify-content: center }") style.sheet.insertRule("div[class*='round-result_topPlayersButton__'] { position: absolute; bottom: 9rem }") style.sheet.insertRule("div[class*='shadow-text_positiveTextShadow_CUSTOM_1_'] { text-shadow: 0 .25rem 0 var(--ds-color-black-50),.125rem .125rem .5rem var(--ds-color-green-50),0 -.25rem .5rem var(--ds-color-green-50),-.25rem .5rem .5rem #77df9b,0 0.375rem 2rem var(--ds-color-green-50),0 0 0 var(--ds-color-green-50),0 0 1.5rem rgba(161,155,217,.65),.25rem .25rem 1rem var(--ds-color-green-50) }") style.sheet.insertRule("div[class*='shadow-text_negativeTextShadow_CUSTOM_1_'] { text-shadow: 0 .25rem 0 var(--ds-color-black-50),.125rem .125rem .5rem var(--ds-color-red-50),0 -.25rem .5rem var(--ds-color-red-50),-.25rem .5rem .5rem #b45862,0 0.375rem 2rem var(--ds-color-red-50),0 0 0 var(--ds-color-red-50),0 0 1.5rem rgba(161,155,217,.65),.25rem .25rem 1rem var(--ds-color-red-50) }") const newFormatSummary = (streak, positive) => `