您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display the current lat/lng in the GeoGuessr Map Maker, can be locked with a right click
当前为
// ==UserScript== // @name GeoGuessr Map Maker lat/lng // @namespace ggmmll // @description Display the current lat/lng in the GeoGuessr Map Maker, can be locked with a right click // @version 0.1 // @match https://www.geoguessr.com/* // @require https://openuserjs.org/src/libs/xsanda/Run_code_as_client.js // @require https://openuserjs.org/src/libs/xsanda/Google_Maps_Promise.js // @run-at document-start // @license MIT // ==/UserScript== googleMapsPromise.then(() => runAsClient(() => { const google = window.google; var flag = false function displayCoordinates(ev) { let mmms = document.getElementsByClassName("map-maker-map") if (mmms.length == 1) { let position = document.getElementById("position") if (!position) { position = document.createElement("div") position.id = "position" position.style = "position: relative; text-align: center; pointer-events: none;" mmms[0].appendChild(position) } if (!flag) { position.innerText = ev.latLng.lat() + "," + ev.latLng.lng() } } } const oldMap = google.maps.Map; google.maps.Map = Object.assign(function (...args) { const res = oldMap.apply(this, args); this.addListener('mousemove', displayCoordinates); this.addListener('rightclick', () => {flag = !flag}); return res; }, { prototype: Object.create(oldMap.prototype) }); }));