mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +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 = {
|
channelIDInfo = {
|
||||||
status: ChannelIDStatus.Found,
|
status: ChannelIDStatus.Found,
|
||||||
id: getChannelID()
|
id: getChannelID().match(/^\/?([^\s/]+)/)[0]
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
channelIDInfo = {
|
channelIDInfo = {
|
||||||
@@ -864,7 +864,8 @@ async function whitelistCheck() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//see if this is a whitelisted channel
|
//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;
|
channelWhitelisted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user