1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Update twitch-videoad.js scriptlet

Related commit:
- aad8946dab

Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1789#issuecomment-962440694
This commit is contained in:
Raymond Hill 2021-11-14 13:55:34 -05:00
parent c90b2e4d6f
commit ddd31f3567
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1562,6 +1562,9 @@
/// twitch-videoad.js
// https://github.com/uBlockOrigin/uAssets/issues/5184
// https://github.com/pixeltris/TwitchAdSolutions/commit/6be4c5313035
// https://github.com/pixeltris/TwitchAdSolutions/commit/3d2883ea9e3a
// https://github.com/pixeltris/TwitchAdSolutions/commit/7233b5fd2284
// https://github.com/pixeltris/TwitchAdSolutions/commit/aad8946dab2b
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
window.fetch = new Proxy(window.fetch, {
@ -1573,7 +1576,8 @@
init instanceof Object &&
init.headers instanceof Object &&
typeof init.body === 'string' &&
init.body.includes('PlaybackAccessToken')
init.body.includes('PlaybackAccessToken') &&
init.body.includes('"isVod":true') === false
) {
const { headers } = init;
if ( typeof headers['Authorization'] === 'string' ) {