From c34a6752358654ee386c486acf68ee08b9770617 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Tue, 28 Jan 2020 12:38:02 +0100 Subject: [PATCH] Update openstreetmap_geouri.user.js --- openstreetmap_geouri.user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openstreetmap_geouri.user.js b/openstreetmap_geouri.user.js index 365e342..62e484e 100644 --- a/openstreetmap_geouri.user.js +++ b/openstreetmap_geouri.user.js @@ -4,7 +4,7 @@ // @include https://www.openstreetmap.org/* // @description OpenStreetmap GeoURI Handler. This resolved "geo:," URIs via openstreetmap, by registering to an unidentified URL on osm and then rewriting it on call. // @author Tobias Schmidl -// @version 0.1.9 +// @version 0.1.10 // @grant GM_getValue // @grant GM_listValues // @downloadURL https://github.com/schtobia/greasemonkey/raw/master/openstreetmap_geouri.user.js @@ -15,4 +15,6 @@ window.navigator.registerProtocolHandler("geo", "https://www.openstreetmap.org/g var regex = /geouri\/geo(%3A|:)([0-9\.-]+)(%2C|,)([0-9\.-]+)/; if (location.href.match(regex)) +{ location.href = location.href.replace(regex, "?mlat=$2&mlon=$4&zoom=12"); +}