Upd #172033 youtube.com

Move the rule that fixes ads on YouTube Shorts to the Base filter
This commit is contained in:
Adam Wróblewski
2024-04-09 16:58:50 +02:00
parent 531cd2b265
commit 644aaa27d7
2 changed files with 4 additions and 3 deletions

View File

@@ -232,6 +232,10 @@ m.youtube.com,music.youtube.com,youtubekids.com,youtube-nocookie.com#%#//scriptl
! https://github.com/AdguardTeam/AdguardFilters/issues/172033#issuecomment-1925290685
||googlevideo.com/initplayback?source=youtube&*&c=TVHTML5&oad=$xmlhttprequest,domain=youtube.com
[$path=/tv]youtube.com#%#//scriptlet('json-prune', 'playerResponse.adPlacements playerResponse.playerAds playerResponse.adSlots adPlacements playerAds adSlots', '', '/https:\/\/www\.youtube\.com\/s\/player\/.*\/tv-player-ias\.vflset\/tv-player-ias\.js:/')
! Fix ads on https://www.youtube.com/shorts/
! https://github.com/AdguardTeam/AdguardFilters/issues/172033#issuecomment-1991263854
! TODO: use scriptlet when this issue will be fixed - https://github.com/AdguardTeam/Scriptlets/issues/183
www.youtube.com#%#(()=>{window.JSON.parse=new Proxy(JSON.parse,{apply(r,e,t){const n=Reflect.apply(r,e,t);if(!location.pathname.startsWith("/shorts/"))return n;const a=n?.entries;return a&&Array.isArray(a)&&(n.entries=n.entries.filter((r=>{if(!r?.command?.reelWatchEndpoint?.adClientParams?.isAd)return r}))),n}});})();
! This one may be unnecessary:
||youtube.com/get_video_info?*=adunit&$important
! https://github.com/AdguardTeam/AdguardFilters/issues/81610