1
0
mirror of https://github.com/pixeltris/TwitchAdSolutions.git synced 2024-11-22 02:12:45 +01:00
pixeltris 2021-11-06 12:15:08 +00:00
parent 7233b5fd22
commit aad8946dab
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ twitch-videoad.js application/javascript
function hookFetch() {
var realFetch = window.fetch;
window.fetch = function(url, init, ...args) {
if (typeof url === 'string' && url.includes('gql') && typeof init.body == 'string' && init.body.includes('PlaybackAccessToken')) {
if (typeof url === 'string' && url.includes('gql') && typeof init.body == 'string' && init.body.includes('PlaybackAccessToken') && !init.body.includes('"isVod":true')) {
if (typeof init.headers['Authorization'] === 'string') {
init.headers['Authorization'] = '';
}

View File

@ -15,7 +15,7 @@
function hookFetch() {
var realFetch = window.fetch;
window.fetch = function(url, init, ...args) {
if (typeof url === 'string' && url.includes('gql') && typeof init.body == 'string' && init.body.includes('PlaybackAccessToken')) {
if (typeof url === 'string' && url.includes('gql') && typeof init.body == 'string' && init.body.includes('PlaybackAccessToken') && !init.body.includes('"isVod":true')) {
if (typeof init.headers['Authorization'] === 'string') {
init.headers['Authorization'] = '';
}