From 3d27eaff53e642e51754a00ed1900e149a20b1f0 Mon Sep 17 00:00:00 2001 From: Dangrainage <99558179+Dangrainage@users.noreply.github.com> Date: Thu, 25 Apr 2024 08:42:27 +0200 Subject: [PATCH] Update Tester.HTML --- Tester.HTML | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Tester.HTML b/Tester.HTML index 8238dd7..aad2e8f 100644 --- a/Tester.HTML +++ b/Tester.HTML @@ -38,14 +38,17 @@ if (results.length === 0) { searchResultsDiv.textContent = 'No results found.'; } else { + let resultList = document.createElement('ul'); results.forEach(result => { + let listItem = document.createElement('li'); let link = document.createElement('a'); link.textContent = `${result.title} (${result.year})`; - link.href = result.link; - link.style.display = 'block'; - link.style.marginBottom = '10px'; - searchResultsDiv.appendChild(link); + link.href = result.link; // Assuming there's a 'link' property in the dictionary + link.target = '_blank'; // Open link in a new tab + listItem.appendChild(link); + resultList.appendChild(listItem); }); + searchResultsDiv.appendChild(resultList); } }