From 572fee265d69a3a50c71d0b980938c8b9f1c5b93 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 11 Jul 2021 22:12:08 -0400 Subject: [PATCH] Handle / in channel URL Fixes https://github.com/ajayyy/SponsorBlock/issues/766 --- src/content.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index 8f98edaa..e09a636d 100644 --- a/src/content.ts +++ b/src/content.ts @@ -852,7 +852,7 @@ async function whitelistCheck() { channelIDInfo = { status: ChannelIDStatus.Found, - id: getChannelID() + id: getChannelID().match(/^\/?([^\s/]+)/)[0] } } catch (e) { channelIDInfo = { @@ -864,7 +864,8 @@ async function whitelistCheck() { } //see if this is a whitelisted channel - if (whitelistedChannels != undefined && whitelistedChannels.includes(getChannelID())) { + if (whitelistedChannels != undefined && + channelIDInfo.status === ChannelIDStatus.Found && whitelistedChannels.includes(channelIDInfo.id)) { channelWhitelisted = true; }