Skip to content

Commit

Permalink
Revert YT change, use previous working rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbr committed Sep 21, 2024
1 parent 9e99fe0 commit 7f4ddc5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions brave-unbreak.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
@@||cloudfront.net/o?*fqdn=$xhr,3p,domain=marketwatch.com|wsj.com
@@||cloudfront.net/*.js|$script,3p,domain=marketwatch.com|wsj.com

! excempt current rule
! https://community.brave.com/t/brave-stopt-blocking-youtube-adds/569660/30
!
www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&e.loaded<e.duration&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)
! previous YT rule
www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), (()=>{let e="";document.addEventListener("DOMContentLoaded"\,(function(){if(!window.yt?.config_?.EXPERIMENT_FLAGS?.html5_enable_ssap_entity_id)return;const t=()=>{const t=document.getElementById("movie_player");if(!t)return;const n=t.querySelector("video");if(!n)return;const o=t.getVideoStats?.()?.ssap;if(n.duration&&o&&o.includes("vid.nvd")){const i=parseInt(o.split("st.").at(-1).split(";")[0])/1e3;let r=[];for(const e of o.matchAll(/\bcpn\.([-\w]+)/g))r.push(e[1]);const s=r.join("\,");(!1===n.loop&&e!==s&&n.currentTime<i||!0===n.loop&&n.currentTime<i||.001===n.currentTime&&n.currentTime<i)&&(t.seekTo(i)\,e=s)}};t();new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})}))})();(function serverContract(), sedCount, 1)

! Causes blank pages, breaks too much 1p scripts
.com/*/js_$script,domain=360dx.com|adage.com|autonews.com|chicagobusiness.com|crainscleveland.com|crainsdetroit.com|crainsgrandrapids.com|crainsnewyork.com|genomeweb.com|modernhealthcare.com|plasticsnews.com|precisionmedicineonline.com|rubbernews.com|sustainableplastics.com|tirebusiness.com|utech-polyurethane.com,badfilter
! Counter paywall
Expand Down

0 comments on commit 7f4ddc5

Please sign in to comment.