UI - Fixing issue where search box JS interfered with page render when logged out

pull/1961/head
dgtlmoon 1 year ago
parent 89797dfe02
commit 9f41d15908

@ -19,14 +19,14 @@ $(document).ready(function () {
// Search input box behaviour
const toggle_search = document.getElementById("toggle-search");
const search_q = document.getElementById("search-q");
if(search_q) {
window.addEventListener('keydown', function (e) {
if (e.altKey == true && e.keyCode == 83)
if (e.altKey == true && e.keyCode == 83) {
search_q.classList.toggle('expanded');
search_q.focus();
}
});
search_q.onkeydown = (e) => {
var key = e.keyCode || e.which;
if (key === 13) {
@ -43,10 +43,10 @@ $(document).ready(function () {
search_q.focus();
}
};
}
$('#heart-us').click(function () {
$("#overlay").toggleClass('visible');
heartpath.style.fill = document.getElementById("overlay").classList.contains("visible") ? '#ff0000' : 'var(--color-background)';
});
});

Loading…
Cancel
Save