mirror of
https://github.com/pixeltris/TwitchAdSolutions.git
synced 2025-04-29 14:14:36 +02:00
Possibly fix "bypass" for logged-in users
Ref - https://github.com/pixeltris/TwitchAdSolutions/issues/49#issuecomment-959837717 - https://github.com/uBlockOrigin/uBlock-issues/issues/1789#issuecomment-959831926
This commit is contained in:
parent
5d42523565
commit
7233b5fd22
@ -5,6 +5,9 @@ twitch-videoad.js application/javascript
|
||||
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 init.headers['Authorization'] === 'string') {
|
||||
init.headers['Authorization'] = '';
|
||||
}
|
||||
if (typeof init.headers['X-Device-Id'] === 'string') {
|
||||
init.headers['X-Device-Id'] = 'twitch-web-wall-mason';
|
||||
}
|
||||
|
@ -16,6 +16,9 @@
|
||||
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 init.headers['Authorization'] === 'string') {
|
||||
init.headers['Authorization'] = '';
|
||||
}
|
||||
if (typeof init.headers['X-Device-Id'] === 'string') {
|
||||
init.headers['X-Device-Id'] = 'twitch-web-wall-mason';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user