From a7a2052e6f51230be6fdad04a1cffb359041cf48 Mon Sep 17 00:00:00 2001 From: Ryan Montgomery <44453666+0dayCTF@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:33:18 -0500 Subject: [PATCH] Added Search Functionality A bit buggy but works for now! --- js/script.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/script.js b/js/script.js index bea2364..860b974 100644 --- a/js/script.js +++ b/js/script.js @@ -556,3 +556,12 @@ document.getElementById('searchBox').addEventListener('keyup', function() { document.getElementById('noResults').style.display = count === 0 ? '' : 'none'; }); + +// Event listener for search results +document.querySelectorAll('#reverse-shell-selection .list-group-item').forEach(function(item) { + item.addEventListener('click', function(event) { + event.preventDefault(); + console.log(item.textContent); + document.getElementById('searchBox').dispatchEvent(new Event('keyup')); + }); +});