]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/application.js
Simplify sidebar/resize
[rails.git] / app / assets / javascripts / application.js
index 0ee6dc8806a7c94607619259352e92970668b58f..336d3eab0b1689b3c04409f05cffa6263bb246a6 100644 (file)
@@ -16,7 +16,6 @@
 //= require menu
 //= require sidebar
 //= require richtext
-//= require resize
 //= require geocoder
 //= require querystring
 
@@ -121,7 +120,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 +130,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),