Speedup search loading when search url is received

This commit is contained in:
Guillaume Gomez 2017-11-23 21:19:48 +01:00
parent f28df20026
commit de3a291455

View File

@ -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;
}
@ -1756,6 +1755,14 @@
}
};
}
var params = getQueryStringParams();
if (params && params.search) {
addClass(document.getElementById("main"), "hidden");
var search = document.getElementById("search");
removeClass(search, "hidden");
search.innerHTML = '<h3 style="text-align: center;">Loading search results...</h3>';
}
}());
// Sets the focus on the search bar at the top of the page