pixeltris 2021-11-03 20:10:05 +00:00
parent 5d42523565
commit 7233b5fd22
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,9 @@ twitch-videoad.js application/javascript
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')) {
if (typeof init.headers['Authorization'] === 'string') {
init.headers['Authorization'] = '';
}
if (typeof init.headers['X-Device-Id'] === 'string') { if (typeof init.headers['X-Device-Id'] === 'string') {
init.headers['X-Device-Id'] = 'twitch-web-wall-mason'; init.headers['X-Device-Id'] = 'twitch-web-wall-mason';
} }

View File

@ -16,6 +16,9 @@
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')) {
if (typeof init.headers['Authorization'] === 'string') {
init.headers['Authorization'] = '';
}
if (typeof init.headers['X-Device-Id'] === 'string') { if (typeof init.headers['X-Device-Id'] === 'string') {
init.headers['X-Device-Id'] = 'twitch-web-wall-mason'; init.headers['X-Device-Id'] = 'twitch-web-wall-mason';
} }