mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-14 07:27:05 +03:00
Use a specific error message channel whitelisting on YTTV
This commit is contained in:
Submodule public/_locales updated: 5ca124d121...2b3c82bfc7
@@ -240,7 +240,8 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
|
||||
break;
|
||||
case "getChannelID":
|
||||
sendResponse({
|
||||
channelID: getChannelIDInfo().id
|
||||
channelID: getChannelIDInfo().id,
|
||||
isYTTV: (document.location.host === "tv.youtube.com")
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
@@ -86,6 +86,7 @@ interface GetVideoIdResponse {
|
||||
|
||||
export interface GetChannelIDResponse {
|
||||
channelID: string;
|
||||
isYTTV: boolean;
|
||||
}
|
||||
|
||||
export interface SponsorStartResponse {
|
||||
|
||||
@@ -917,7 +917,11 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
//get the channel url
|
||||
const response = await sendTabMessageAsync({ message: 'getChannelID' }) as GetChannelIDResponse;
|
||||
if (!response.channelID) {
|
||||
alert(chrome.i18n.getMessage("channelDataNotFound") + " https://github.com/ajayyy/SponsorBlock/issues/753");
|
||||
if (response.isYTTV) {
|
||||
alert(chrome.i18n.getMessage("yttvNoChannelWhitelist"));
|
||||
} else {
|
||||
alert(chrome.i18n.getMessage("channelDataNotFound") + " https://github.com/ajayyy/SponsorBlock/issues/753");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user