mirror of
https://github.com/pixeltris/TwitchAdSolutions.git
synced 2025-04-29 14:14:36 +02:00
Don't apply "bypass" on vods
https://github.com/uBlockOrigin/uBlock-issues/issues/1789#issuecomment-962440694
This commit is contained in:
parent
7233b5fd22
commit
aad8946dab
@ -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'] = '';
|
||||||
}
|
}
|
||||||
|
@ -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'] = '';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user