X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2948b86eb5b4aa64ae5b8db46d81033a4b830a4e..1fc2a70c1713172317acb14b76ef8ac45d994065:/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) {