From: John Firebaugh Date: Mon, 1 Jul 2013 19:46:10 +0000 (-0400) Subject: Include current non-OSM.org hostname in share URL X-Git-Tag: live~4885^2~18 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/bab796bc7eb0b44eeb15d6fee567440647bc57e0?hp=de5a225a95125db1a66d6dfbaa3a790db9719c18 Include current non-OSM.org hostname in share URL --- 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),