blob: af271a217acbcd7e8a82c35fb0c62f8f96cde5ae [file] [log] [blame]
function altSearchBar() {
if (document.querySelector(".md-google-search__metacontainer").style.display == "none") {
document.querySelector(".md-google-search__metacontainer").style.display = "block";
document.querySelector("#search i").innerText = "fullscreen";
document.querySelector("#search-input").focus();
} else {
document.querySelector(".md-google-search__metacontainer").style.display = "none";
document.querySelector(".autocomplete-container").style.display = "none";
document.querySelector("#search i").innerText = "search";
}
}
function initSearchBar() {
document.querySelector("#search").addEventListener("click", altSearchBar);
if (window.innerWidth > 700) altSearchBar();
}