Skip to content

Instantly share code, notes, and snippets.

@petitJAM
Created November 10, 2020 03:29
Show Gist options
  • Save petitJAM/b3bf2df3a06369d56c20eb7e3c8e6161 to your computer and use it in GitHub Desktop.
Save petitJAM/b3bf2df3a06369d56c20eb7e3c8e6161 to your computer and use it in GitHub Desktop.
uBlock Origin - Twitch Fix
# 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);
};
})();
@petitJAM
Copy link
Author

uBlockOrigin/uBlock-issues#1789
Looks like this has been obsoleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment