Cleanup search element getter
This commit is contained in:
parent
cf148a717a
commit
1d2808341a
1 changed files with 2 additions and 2 deletions
|
@ -1218,7 +1218,7 @@ function getSearchElement() {
|
||||||
}
|
}
|
||||||
dst = dst[0];
|
dst = dst[0];
|
||||||
if (window.location.pathname === dst.pathname) {
|
if (window.location.pathname === dst.pathname) {
|
||||||
addClass(document.getElementById("search"), "hidden");
|
addClass(getSearchElement(), "hidden");
|
||||||
removeClass(main, "hidden");
|
removeClass(main, "hidden");
|
||||||
document.location.href = dst.href;
|
document.location.href = dst.href;
|
||||||
}
|
}
|
||||||
|
@ -2454,7 +2454,7 @@ function getSearchElement() {
|
||||||
function putBackSearch(search_input) {
|
function putBackSearch(search_input) {
|
||||||
if (search_input.value !== "") {
|
if (search_input.value !== "") {
|
||||||
addClass(main, "hidden");
|
addClass(main, "hidden");
|
||||||
removeClass(document.getElementById("search"), "hidden");
|
removeClass(getSearchElement(), "hidden");
|
||||||
if (browserSupportsHistoryApi()) {
|
if (browserSupportsHistoryApi()) {
|
||||||
history.replaceState(search_input.value,
|
history.replaceState(search_input.value,
|
||||||
"",
|
"",
|
||||||
|
|
Loading…
Reference in a new issue