Created
November 20, 2022 16:28
-
-
Save zb3/ec4329b72e05d7ff3c57d1f254c7d373 to your computer and use it in GitHub Desktop.
Unblock TVP Sport streams when using uBlock Origin
This file contains 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
// ==UserScript== | |
// @name sporttvp | |
// @namespace zb3.sporttvp | |
// @include https://sport.tvp.pl/* | |
// @version 1 | |
// @run-at document-start | |
// ==/UserScript== | |
function inject() { | |
const assign = Object.assign; | |
Object.assign = function(target, ...sources) { | |
if (sources[0]?.hasOwnProperty('denyAds')) { | |
sources.push({ | |
denyAds: true, | |
gplayerAccountId: "", | |
gstreamAccountId: "", | |
tvpvtLibUrl: null, | |
gplayerLibUrl: null | |
}); | |
} | |
return assign.call(this, target, ...sources); | |
}; | |
} | |
const script = document.createElement('script'); | |
script.textContent = `(${inject.toString()})();`; | |
document.documentElement.appendChild(script); | |
script.remove(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment