X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c3e2e6462f293596aef5d5de18b0a173edc046c7..1b2bfb6e9242d5ec8ff5ab65d44b5761d95d1942:/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(); }