aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-07-11 22:12:08 -0400
committerAjay Ramachandran <[email protected]>2021-07-11 22:12:08 -0400
commit572fee265d69a3a50c71d0b980938c8b9f1c5b93 (patch)
tree039be7b13fe3924c888f6e221c35083954b25c1b /src
parentbfe1e8307dc35dce5e97041f07f8376d7caca989 (diff)
downloadSponsorBlock-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.ts5
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;
}