From 010d19aff9f6ee4a46e6dad276bca16f8d3a1adb Mon Sep 17 00:00:00 2001 From: Kotuklion Date: Mon, 12 Jul 2021 18:48:52 +0200 Subject: [PATCH] check host instead of the whole href for occurence of wikipedia.org --- src/pages/background/background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/background/background.js b/src/pages/background/background.js index 00dd00d..e3727e7 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -601,7 +601,7 @@ browser.webRequest.onBeforeRequest.addListener( redirect = { redirectUrl: redirectGoogleTranslate(url, initiator), }; - } else if (url.href.match(wikipediaRegex)) { + } else if (url.host.match(wikipediaRegex)) { redirect = { redirectUrl: redirectWikipedia(url, initiator), };