X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0cb475cc1ad12c82ff0a36f7b9629c2288737a4f..1f0884a34c078ae955c0466fbcdddadfab9dca33:/app/assets/javascripts/index.js?ds=sidebyside diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 66dfa5b6f..afb6b3d65 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -236,6 +236,10 @@ $(document).ready(function () { }; page.load = function() { + var params = querystring.parse(location.search.substring(1)); + if (params.query) { + $("#sidebar .search_form input[name=query]").value(params.query); + } if (!("autofocus" in document.createElement("input"))) { $("#sidebar .search_form input[name=query]").focus(); }