From de130b1a79a3e60263fb59cb9cd5b570bf0b9b26 Mon Sep 17 00:00:00 2001 From: Kevin Payravi Date: Thu, 18 Apr 2024 20:31:22 +0200 Subject: [PATCH] Check for removal of new link Qwant can sometimes remove the new link button but leave the ancestor iwb-detected class intact. --- scripts/content-search-filtering.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/content-search-filtering.js b/scripts/content-search-filtering.js index 69eea42..296da3d 100644 --- a/scripts/content-search-filtering.js +++ b/scripts/content-search-filtering.js @@ -584,7 +584,7 @@ async function filterSearchResults(searchResults, searchEngine, storage, reorder for (const searchResult of searchResults) { try { // Check that result isn't within another result - if (!searchResult.closest('.iwb-detected')) { + if (!searchResult.closest('.iwb-detected') || !searchResult.closest('.iwb-detected')?.querySelector('.iwb-new-link')) { searchResultLink = searchResult.href || ''; if (!searchResultLink) {