From b8fb2c38925f64627e14e3ac39c1e69003449d83 Mon Sep 17 00:00:00 2001 From: pixeltris <6952411+pixeltris@users.noreply.github.com> Date: Sat, 15 Jun 2024 11:05:38 +0100 Subject: [PATCH] Fix regex for backup url --- video-swap-new/video-swap-new-ublock-origin.js | 2 +- video-swap-new/video-swap-new.user.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/video-swap-new/video-swap-new-ublock-origin.js b/video-swap-new/video-swap-new-ublock-origin.js index 85531f0..371a5f1 100644 --- a/video-swap-new/video-swap-new-ublock-origin.js +++ b/video-swap-new/video-swap-new-ublock-origin.js @@ -178,7 +178,7 @@ twitch-videoad.js text/javascript postMessage({key:'UboHideAdBanner'}); } if (haveAdTags && streamInfo.BackupEncodings != null) { - var streamM3u8Url = streamInfo.BackupEncodings.match(/^https:.*\.m3u8$/m)[0]; + var streamM3u8Url = streamInfo.BackupEncodings.match(/^https:.*\.m3u8.*$/m)[0]; var streamM3u8Response = await realFetch(streamM3u8Url); if (streamM3u8Response.status == 200) { textStr = await streamM3u8Response.text(); diff --git a/video-swap-new/video-swap-new.user.js b/video-swap-new/video-swap-new.user.js index 502a0ad..e9c2bf7 100644 --- a/video-swap-new/video-swap-new.user.js +++ b/video-swap-new/video-swap-new.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name TwitchAdSolutions (video-swap-new) // @namespace https://github.com/pixeltris/TwitchAdSolutions -// @version 1.25 +// @version 1.26 // @updateURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/video-swap-new/video-swap-new.user.js // @downloadURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/video-swap-new/video-swap-new.user.js // @description Multiple solutions for blocking Twitch ads (video-swap-new) @@ -190,7 +190,7 @@ postMessage({key:'UboHideAdBanner'}); } if (haveAdTags && streamInfo.BackupEncodings != null) { - var streamM3u8Url = streamInfo.BackupEncodings.match(/^https:.*\.m3u8$/m)[0]; + var streamM3u8Url = streamInfo.BackupEncodings.match(/^https:.*\.m3u8.*$/m)[0]; var streamM3u8Response = await realFetch(streamM3u8Url); if (streamM3u8Response.status == 200) { textStr = await streamM3u8Response.text();