add global search

This commit is contained in:
naielv
2025-10-02 22:45:41 +02:00
parent f46ec17c03
commit 617711fb1a
6 changed files with 517 additions and 4 deletions

View File

@@ -62,7 +62,15 @@ function open_page(params) {
function setUrlHash(hash) {
location.hash = "#" + hash;
// Handle quick search transfer
if (hash === 'buscar') {
const quickSearchInput = document.getElementById('quickSearchInput');
if (quickSearchInput && quickSearchInput.value.trim()) {
// Store the search term temporarily
sessionStorage.setItem('telesec_quick_search', quickSearchInput.value.trim());
quickSearchInput.value = ''; // Clear the input
}
}
}
window.onhashchange = () => {
open_page(location.hash.replace("#", ""));