From c09b8958a2267f1e65406167b2c7905f043ddaeb Mon Sep 17 00:00:00 2001 From: Kevin Payravi Date: Wed, 26 Jul 2023 12:53:16 -0500 Subject: [PATCH] Adjusting search filter regex Resolves issue with filtering results in HTML DuckDuckGo --- content-search-filtering.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content-search-filtering.js b/content-search-filtering.js index bd53278..855afcb 100644 --- a/content-search-filtering.js +++ b/content-search-filtering.js @@ -67,7 +67,9 @@ function filterSearchResults(searchResults, searchEngine, storage) { console.log('Indie Wiki Buddy failed to properly parse search results with error: ' + e); } // Check if site is in our list of wikis: - let matchingSites = sites.filter(el => String(searchResultLink).replace(/(.*)https?:\/\//, '').startsWith(el.origin_base_url)); + let matchingSites = sites.filter(el => + String(searchResultLink).replace(/(.*)https?(:\/\/|%3A%2F%2F)/, '').startsWith(el.origin_base_url) + ); if (matchingSites.length > 0) { // Select match with longest base URL let closestMatch = "";