// ==UserScript== // @name WorldGuessr helper (100% exact position, auto mark after 48 hours) // @namespace http://tampermonkey.net/ // @version v1.1 // @description Locates WorldGuessr street view // @author M4cr0s // @match *://www.worldguessr.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=worldguessr.com // @grant GM_addStyle // @license MIT // @run-at document-start // @downloadURL none // ==/UserScript== (function() { 'use strict'; let lastLat = null, lastLng = null, isFetching = false; GM_addStyle(` #wg-helper-ui { position: fixed; top: 15px; left: 15px; background: rgba(10, 10, 10, 0.98); color: #00ffcc; padding: 15px; border: 2px solid #ff0055; z-index: 999999; font-family: 'Segoe UI', Tahoma, sans-serif; border-radius: 10px; box-shadow: 0 0 20px rgba(255, 0, 85, 0.7); width: 310px; display: none; pointer-events: auto; } .info-row { margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #222; } .label-tag { color: #ff0055; font-weight: bold; font-size: 10px; text-transform: uppercase; display: block; } .value-text { color: #fff; font-size: 13px; font-weight: 500; } .coords-box { background: #1a1a1a; padding: 6px; border-radius: 4px; margin: 10px 0; border: 1px solid #333; text-align: center; } #map-canvas { width: 100%; height: 260px; border-radius: 6px; border: 1px solid #444; margin-top: 10px; background: #000; overflow: hidden; } #map-canvas iframe { width: 100%; height: 100%; border: none; } `); async function fetchLocation(lat, lon) { if (isFetching) return; isFetching = true; try { const api = `https://nominatim.openstreetmap.org/reverse?lat=${lat}&lon=${lon}&format=json&addressdetails=1`; const res = await fetch(api); const obj = await res.json(); const ad = obj.address || {}; document.getElementById('txt-p').textContent = ad.country || "---"; document.getElementById('txt-e').textContent = ad.state || ad.region || "---"; document.getElementById('txt-m').textContent = ad.county || ad.municipality || "---"; document.getElementById('txt-l').textContent = ad.city || ad.town || ad.village || ad.suburb || "---"; } catch (e) { } finally { isFetching = false; } } const initUI = () => { if (document.getElementById('wg-helper-ui')) return; const ui = document.createElement('div'); ui.id = 'wg-helper-ui'; ui.innerHTML = `