Minor code change

This commit is contained in:
Younes Aassila 2024-03-09 13:27:25 +01:00
parent af02be5927
commit a9e7e3c02f
3 changed files with 4 additions and 3 deletions

View File

@ -6,6 +6,6 @@ export const twitchGqlHostRegex = /^gql\.twitch\.tv$/i;
export const twitchTvHostRegex = /^(?:www|m)\.twitch\.tv$/i; export const twitchTvHostRegex = /^(?:www|m)\.twitch\.tv$/i;
export const usherHostRegex = /^usher\.ttvnw\.net$/i; export const usherHostRegex = /^usher\.ttvnw\.net$/i;
export const videoWeaverHostRegex = export const videoWeaverHostRegex =
/^(?:video-weaver\.\w+\.hls\.ttvnw\.net|\w+\.playlist\.live-video\.net)$/i; /^(?:\w+\.playlist\.live-video\.net|video-weaver\.\w+\.hls\.ttvnw\.net)$/i;
export const videoWeaverUrlRegex = export const videoWeaverUrlRegex =
/^https?:\/\/(?:video-weaver\.\w+\.hls\.ttvnw\.net|\w+\.playlist\.live-video\.net)\/v1\/playlist\/.+\.m3u8$/gim; /^https?:\/\/(?:\w+\.playlist\.live-video\.net|video-weaver\.\w+\.hls\.ttvnw\.net)\/v1\/playlist\/.+\.m3u8$/gim;

View File

@ -436,6 +436,7 @@ export function getFetch(pageState: PageState): typeof fetch {
const videoWeaverUrls = [...(assignedMap?.values() ?? [])]; const videoWeaverUrls = [...(assignedMap?.values() ?? [])];
videoWeaverUrls.forEach(url => { videoWeaverUrls.forEach(url => {
videoWeaverUrlsProxiedCount.delete(url); // Shouldn't be necessary, but just in case. videoWeaverUrlsProxiedCount.delete(url); // Shouldn't be necessary, but just in case.
videoWeaverUrlsToNotProxy.delete(url); // Shouldn't be necessary, but just in case.
if (isFrontpage || isWhitelisted) videoWeaverUrlsToNotProxy.add(url); if (isFrontpage || isWhitelisted) videoWeaverUrlsToNotProxy.add(url);
}); });
pageState.sendMessageToContentScript({ pageState.sendMessageToContentScript({

View File

@ -201,7 +201,7 @@ function onChannelChange(
}); });
} }
onChannelChange((channelName, oldChannelName) => { onChannelChange((_channelName, oldChannelName) => {
sendMessageToContentScript({ sendMessageToContentScript({
type: MessageType.ClearStats, type: MessageType.ClearStats,
channelName: oldChannelName, channelName: oldChannelName,