mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Handle / in channel URL
Fixes https://github.com/ajayyy/SponsorBlock/issues/766
This commit is contained in:
parent
bfe1e8307d
commit
572fee265d
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue