diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index dc8ce627638..bdd7b7dd0b7 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -119,8 +119,7 @@ map(function(s) { var pair = s.split("="); params[decodeURIComponent(pair[0])] = - typeof pair[1] === "undefined" ? - null : decodeURIComponent(pair[1]); + typeof pair[1] === "undefined" ? null : decodeURIComponent(pair[1]); }); return params; } @@ -1822,6 +1821,14 @@ } }; } + + var params = getQueryStringParams(); + if (params && params.search) { + addClass(document.getElementById("main"), "hidden"); + var search = document.getElementById("search"); + removeClass(search, "hidden"); + search.innerHTML = '

Loading search results...

'; + } }()); // Sets the focus on the search bar at the top of the page