From 2b3d43e0dca0a9ea8090b5f114f8285f250b8230 Mon Sep 17 00:00:00 2001 From: Shiba <44804845+DeepDoge@users.noreply.github.com> Date: Fri, 7 Jan 2022 20:40:36 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=A1bug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ctxFromUrl pathname check fixed --- src/scripts/tabOnUpdated.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/scripts/tabOnUpdated.ts b/src/scripts/tabOnUpdated.ts index cdfb405..a8afc22 100644 --- a/src/scripts/tabOnUpdated.ts +++ b/src/scripts/tabOnUpdated.ts @@ -23,8 +23,7 @@ async function ctxFromURL(href: string): Promise { const url = new URL(href); if (!getSourcePlatfromSettingsFromHostname(url.hostname)) return - if (url.pathname.startsWith('/watch?')) return - if (url.pathname.startsWith('/channel?')) return + if (!(url.pathname.startsWith('/watch') || url.pathname.startsWith('/channel'))) return const { redirect, targetPlatform } = await getExtensionSettingsAsync('redirect', 'targetPlatform'); const descriptor = ytService.getId(href);