Skip to content

Instantly share code, notes, and snippets.

@zb3
Created November 20, 2022 16:28
Show Gist options
  • Save zb3/ec4329b72e05d7ff3c57d1f254c7d373 to your computer and use it in GitHub Desktop.
Save zb3/ec4329b72e05d7ff3c57d1f254c7d373 to your computer and use it in GitHub Desktop.
Unblock TVP Sport streams when using uBlock Origin
// ==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