diff options
author | Ajay Ramachandran <[email protected]> | 2021-07-11 22:12:08 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-07-11 22:12:08 -0400 |
commit | 572fee265d69a3a50c71d0b980938c8b9f1c5b93 (patch) | |
tree | 039be7b13fe3924c888f6e221c35083954b25c1b /src | |
parent | bfe1e8307dc35dce5e97041f07f8376d7caca989 (diff) | |
download | SponsorBlock-572fee265d69a3a50c71d0b980938c8b9f1c5b93.tar.gz SponsorBlock-572fee265d69a3a50c71d0b980938c8b9f1c5b93.zip |
Handle / in channel URL
Fixes https://github.com/ajayyy/SponsorBlock/issues/766
Diffstat (limited to 'src')
-rw-r--r-- | src/content.ts | 5 |
1 files 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; } |