mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Handle / in channel URL
Fixes https://github.com/ajayyy/SponsorBlock/issues/766
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user