您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display the exact number of played games on maps where this number has been rounded (more than 1000 games played)
当前为
// ==UserScript== // @name Geoguessr unrounded games played for popular maps // @version 0.1 // @description Display the exact number of played games on maps where this number has been rounded (more than 1000 games played) // @author victheturtle#5159 // @license MIT // @match https://www.geoguessr.com/* // @grant none // @icon https://www.google.com/s2/favicons?sz=64&domain=geoguessr.com // @namespace https://gf.qytechs.cn/users/967692-victheturtle // ==/UserScript== let last_URL = ""; let map_data = {}; function checkRoundedStat() { let q = document.querySelectorAll(".map-stats_mapStatMetricValue__UW5ne"); return q.length >= 2 && (q[1].innerText.includes("M") || q[1].innerText.includes("K")); }; function addDetailedPlayed() { let elt = document.querySelectorAll(".map-stats_mapStatMetricValue__UW5ne")[1]; let value = map_data.props.pageProps.map.numFinishedGames.toLocaleString(); elt.innerText = value; for (let ms of [100,200,300,400,500]) { setTimeout(() => {elt.innerText = value;}, ms); } }; function checkStats() { if (map_data.props != null) { addDetailedPlayed(); return; } let game_url = window.location.href; fetch(game_url) .then(res => res.text()) .then(str => { let parser = new DOMParser(); let html = parser.parseFromString(str, "text/html"); let dataHTML = html.getElementById("__NEXT_DATA__"); map_data = JSON.parse(dataHTML.innerHTML); addDetailedPlayed(); }).catch(err => {throw(err);}); }; function doCheck() { if (location.pathname.startsWith("/maps") && location.pathname != last_URL && checkRoundedStat()) { checkStats(); } else if (location.pathname != last_URL) { map_data = {}; } location.pathname != last_URL; }; function tryAddDetailedPlayedOnRefresh() { setTimeout(doCheck, 300); }; function tryAddDetailedPlayed() { for (let timeout of [250,500,1200,2000]) { setTimeout(doCheck, timeout); } }; document.addEventListener('click', tryAddDetailedPlayed, false); document.addEventListener('load', tryAddDetailedPlayedOnRefresh(), false); window.addEventListener('popstate', tryAddDetailedPlayed, false);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址