v0.3.0 #12

Merged
partisan merged 13 commits from work into main 2024-09-29 18:36:46 +00:00
Showing only changes of commit c094d9e6a1 - Show all commits

View file

@ -52,6 +52,7 @@ async function getSuggestions(query) {
let currentIndex = -1; // Keep track of the currently selected suggestion let currentIndex = -1; // Keep track of the currently selected suggestion
// Handle click events on the type buttons
let results = []; let results = [];
searchInput.addEventListener('input', async () => { searchInput.addEventListener('input', async () => {
let input = searchInput.value; let input = searchInput.value;
@ -128,15 +129,6 @@ function renderResults(results) {
resultsWrapper.innerHTML = `<ul>${content}</ul>`; resultsWrapper.innerHTML = `<ul>${content}</ul>`;
} }
// Function to handle search input
searchInput.addEventListener('input', async () => {
let input = searchInput.value;
if (input.length) {
const results = await getSuggestions(input);
renderResults(results);
}
});
// Handle click events on the type buttons // Handle click events on the type buttons
const typeButtons = document.querySelectorAll('[name="t"]'); const typeButtons = document.querySelectorAll('[name="t"]');
typeButtons.forEach(button => { typeButtons.forEach(button => {