From bab796bc7eb0b44eeb15d6fee567440647bc57e0 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 1 Jul 2013 15:46:10 -0400 Subject: [PATCH] Include current non-OSM.org hostname in share URL --- app/assets/javascripts/application.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 0ee6dc880..171c42783 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -121,7 +121,7 @@ function minZoomAlert() { function getShortUrl(map) { return (window.location.hostname.match(/^www\.openstreetmap\.org/i) ? - 'http://osm.org/go/' : '/go/') + + 'http://osm.org/go/' : 'http://' + window.location.hostname + '/go/') + makeShortCode(map); } @@ -131,7 +131,7 @@ function getUrl(map) { toZoom = zoomPrecision(zoom); return (window.location.hostname.match(/^www\.openstreetmap\.org/i) ? - 'http://openstreetmap.org/?' : '/?') + + 'http://openstreetmap.org/?' : 'http://' + window.location.hostname + '/?') + querystring.stringify({ lat: toZoom(center.lat), lon: toZoom(center.lng), -- 2.43.2