mirror of
https://github.com/pixeltris/TwitchAdSolutions.git
synced 2025-04-29 22:24:29 +02:00
Fix regex for backup url
This commit is contained in:
parent
644ac7a821
commit
b8fb2c3892
@ -178,7 +178,7 @@ twitch-videoad.js text/javascript
|
|||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
}
|
}
|
||||||
if (haveAdTags && streamInfo.BackupEncodings != null) {
|
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);
|
var streamM3u8Response = await realFetch(streamM3u8Url);
|
||||||
if (streamM3u8Response.status == 200) {
|
if (streamM3u8Response.status == 200) {
|
||||||
textStr = await streamM3u8Response.text();
|
textStr = await streamM3u8Response.text();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name TwitchAdSolutions (video-swap-new)
|
// @name TwitchAdSolutions (video-swap-new)
|
||||||
// @namespace https://github.com/pixeltris/TwitchAdSolutions
|
// @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
|
// @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
|
// @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)
|
// @description Multiple solutions for blocking Twitch ads (video-swap-new)
|
||||||
@ -190,7 +190,7 @@
|
|||||||
postMessage({key:'UboHideAdBanner'});
|
postMessage({key:'UboHideAdBanner'});
|
||||||
}
|
}
|
||||||
if (haveAdTags && streamInfo.BackupEncodings != null) {
|
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);
|
var streamM3u8Response = await realFetch(streamM3u8Url);
|
||||||
if (streamM3u8Response.status == 200) {
|
if (streamM3u8Response.status == 200) {
|
||||||
textStr = await streamM3u8Response.text();
|
textStr = await streamM3u8Response.text();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user