From 49d9854e823bf691294cefb0987c531ccb510b46 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 13 Mar 2016 09:38:44 -0400 Subject: [PATCH] experiment with fixes for #1461 --- assets/checksums.txt | 4 ++-- assets/ublock/resources.txt | 26 ++++++++++++++++++++++++++ assets/ublock/unbreak.txt | 4 ---- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 830f8eb57..ee60b6989 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,11 +1,11 @@ -dfc59bafa8ad38b61c33303824350b8c assets/ublock/unbreak.txt +538211a2228745b51b615b1b245cf99e assets/ublock/unbreak.txt 62111a29f0a5cb361ba8dbae92054adb assets/ublock/redirect-resources.txt 94efb2d9c4bd436707c3923d64cb4f3b assets/ublock/privacy.txt d9fcd484d3b1be1954bcb9252048ca14 assets/ublock/filters.txt 98088252cedafb8571cf61b91bea219e assets/ublock/badware.txt 5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt b65ec581214a0d24dad6522a60f827ab assets/ublock/experimental.txt -f96952a8e31a72e43e0f7755f6d8bcf1 assets/ublock/resources.txt +feae904c1056c9bd3d1a45ff5dad1bda assets/ublock/resources.txt 059e0bfbf22bd242dda7b07389fe09a2 assets/ublock/filter-lists.json 3605c73f21abca428c7eb69a8bc32dfe assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt a91af77c47c302c0741c7445b0fada1a assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt diff --git a/assets/ublock/resources.txt b/assets/ublock/resources.txt index 793035c07..64a3d4cd2 100644 --- a/assets/ublock/resources.txt +++ b/assets/ublock/resources.txt @@ -814,3 +814,29 @@ disqus.com/embed.js application/javascript }; b.addEventListener('click', loadDisqus); })(); + + +# https://github.com/gorhill/uBlock/issues/1461 +ytad-defuser.js application/javascript +(function() { + var ytp, ytpc; + Object.defineProperty(window, 'ytplayer', { + get: function() { + return ytp; + }, + set: function(a) { + ytp = a; + Object.defineProperty(ytp, 'config', { + get: function() { + return ytpc; + }, + set: function(a) { + ytpc = a; + if ( a && a.args && typeof a.args.ad_slots === 'string' ) { + a.args.ad_slots = a.args.ad_slots.replace(/0,?/, ''); + } + } + }); + } + }); +})(); diff --git a/assets/ublock/unbreak.txt b/assets/ublock/unbreak.txt index 96aec38f5..3405a75be 100644 --- a/assets/ublock/unbreak.txt +++ b/assets/ublock/unbreak.txt @@ -266,7 +266,3 @@ phoronix.com#@#div[style^="text-align: center;"] # https://forums.lanik.us/viewtopic.php?f=64&t=28701 @@||files.explosm.net/files/$image,first-party - -# https://github.com/gorhill/uBlock/issues/1461 -# Experimental fix -@@||s.youtube.com^$domain=youtube.com