From f711d6f945470a50f68301890bde9a66ab9c2387 Mon Sep 17 00:00:00 2001 From: Kevin Payravi Date: Sun, 7 Jan 2024 05:57:25 -0600 Subject: [PATCH] Accounting for plus signs in Fextra article names + encoding article titles --- background.js | 9 +++++++++ content-banners.js | 12 ++++++++++-- content-search-filtering.js | 9 +++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index 3241579..ad5dc07 100644 --- a/background.js +++ b/background.js @@ -310,6 +310,15 @@ async function main(url, tabId) { // Replace underscores with spaces as that performs better in search destinationArticle = destinationArticle.replaceAll('_', ' '); + // If a Fextralife wiki, replace plus signs with spaces + // When there are multiple plus signs together, this regex will only replace only the first + if (site['origin_base_url'].includes('.wiki.fextralife.com')) { + destinationArticle = destinationArticle.replace(/(?