Created
September 30, 2020 01:32
-
-
Save Jaygles/8bb3c7c92bbe57008c2a6731e9fa2f5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/uBlockOrigin/uAssets/pull/3517 | |
| twitch-videoad.js application/javascript | |
| (function() { | |
| if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; } | |
| var realFetch = window.fetch; | |
| window.fetch = function(input, init) { | |
| if ( arguments.length >= 2 && typeof input === 'string' && input.includes('/access_token') ) { | |
| var url = new URL(arguments[0]); | |
| url.searchParams.forEach(function(value, key) { | |
| url.searchParams.delete(key); | |
| }); | |
| arguments[0] = url.href; | |
| } | |
| return realFetch.apply(this, arguments); | |
| }; | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment