X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4b36fee5de65f7dee2360225049e71dfbf2657ae..35392c1a2f25ced94150ac81cba1b7e517ce145b:/app/assets/javascripts/index/history.js diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index c20d342c5..d137b8456 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -48,6 +48,9 @@ OSM.History = function (map) { if (window.location.pathname === "/history") { data.bbox = map.getBounds().wrap().toBBoxString(); + var feedLink = $("link[type=\"application/atom+xml\"]"), + feedHref = feedLink.attr("href").split("?")[0]; + feedLink.attr("href", feedHref + "?bbox=" + data.bbox); } $.ajax({ @@ -59,11 +62,6 @@ OSM.History = function (map) { updateMap(); } }); - - var feedLink = $("link[type=\"application/atom+xml\"]"), - feedHref = feedLink.attr("href").split("?")[0]; - - feedLink.attr("href", feedHref + "?bbox=" + data.bbox); } function loadMore(e) {