From 4b3bf9464b915b8160ed980c9582ee95b52e6fe5 Mon Sep 17 00:00:00 2001 From: eclipse Date: Tue, 15 Jul 2025 23:13:21 +0200 Subject: [PATCH] removed a debug print statement --- the_works/static/js/search_all.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/the_works/static/js/search_all.js b/the_works/static/js/search_all.js index 1dfa3a1..070371f 100644 --- a/the_works/static/js/search_all.js +++ b/the_works/static/js/search_all.js @@ -24,7 +24,6 @@ function search_all(s, url) { // build regex that matches search string occurrences let match_case = document.getElementById("match_case").checked; let match_s = new RegExp(`(${s})`, match_case ? "g" : "ig"); -console.dir(match_s); // fetch search results let fetch_url = new URL(url); @@ -83,6 +82,8 @@ console.dir(match_s); tbody.appendChild(tr); } table.appendChild(tbody); + + // add heading and element id heading.innerHTML = `

${db_table} (${tbody.childNodes.length} Treffer)

`; container.setAttribute("id", `details-${db_table.toLowerCase()}`); @@ -92,7 +93,7 @@ console.dir(match_s); document.getElementById("results").insertBefore(document.createElement("hr"), container); } - // open container that was previously opened, or first one + // pre-open container that was either previously opened or, if that's not available, is first let containers = document.querySelectorAll("#results>details"); if ( containers.length ) { let container_ids = [...containers].map(c => c.id);