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

Update for twitch.tv #5184 (#3781)

This commit is contained in:
pixeltris 2020-10-02 17:20:30 +01:00 committed by GitHub
parent bafbb7d62c
commit 75c58ec7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1326,7 +1326,7 @@
})();
// https://github.com/uBlockOrigin/uAssets/pull/3517
// https://github.com/uBlockOrigin/uAssets/issues/5184
/// twitch-videoad.js
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
@ -1334,7 +1334,7 @@
window.fetch = function(input) {
if ( arguments.length >= 2 && typeof input === 'string' && input.includes('/access_token') ) {
var url = new URL(arguments[0]);
url.searchParams.set('platform', '_');
url.searchParams.delete('platform');
arguments[0] = url.href;
}
return realFetch.apply(this, arguments);