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() { function hookFetch() {
var realFetch = window.fetch; var realFetch = window.fetch;
window.fetch = function(url, init, ...args) { 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') { if (typeof init.headers['Authorization'] === 'string') {
init.headers['Authorization'] = ''; init.headers['Authorization'] = '';
} }

View File

@ -15,7 +15,7 @@
function hookFetch() { function hookFetch() {
var realFetch = window.fetch; var realFetch = window.fetch;
window.fetch = function(url, init, ...args) { 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') { if (typeof init.headers['Authorization'] === 'string') {
init.headers['Authorization'] = ''; init.headers['Authorization'] = '';
} }