Merge pull request #152 from 0dayCTF/0dayCTF-patch-11

Added Search Functionality
This commit is contained in:
Ryan Montgomery 2023-12-01 12:33:27 -05:00 committed by GitHub
commit 190888a16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -556,3 +556,12 @@ document.getElementById('searchBox').addEventListener('keyup', function() {
document.getElementById('noResults').style.display = count === 0 ? '' : 'none'; 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'));
});
});