brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.53k stars 2.27k forks source link

Improve blocking Youtube and Youtube Music Nag popups by default #40297

Open ryanbr opened 1 month ago

ryanbr commented 1 month ago

Description

When using youtube or youtube music, the user will be bombarded with various random popups to upsell various services.

This can be improved with procedural filters (has-text) to avoid false positives. https://github.com/brave/adblock-rust/issues/293

We partially already block some of these. https://github.com/brave/adblock-lists/blob/master/brave-lists/experimental.txt#L22

! youtube self nag screens
www.youtube.com##tp-yt-paper-dialog[style-target="host"][role="dialog"][tabindex][syle*="border-box; max-height: 191"]
www.youtube.com##tp-yt-paper-dialog[style-target="host"][role="dialog"][tabindex][syle*="border-box; max-height: 192"]
! Youtube: How are your recommendations today?
www.youtube.com##tp-yt-paper-dialog[style-target="host"][role="dialog"][tabindex][syle*="border-box; max-height: 320px;"]
! its cable reimagined
www.youtube.com##tp-yt-paper-dialog[style-target="host"][role="dialog"][tabindex][syle*="border-box; max-height: 206"]
! Youtube music popup
music.youtube.com##ytmusic-mealbar-promo-renderer.ytmusic-popup-container[enable-bauhaus-style][dialog="true"][tabindex]

Steps to reproduce

Popups are generated randomly;

  1. Upsell Premium, Youtube TV, Free Trials
  2. Request Recommendations, asking the user is still there.

Actual result

get-2-weeks-of-Youtube-TV how-are-your-recommendations its-cable-reiimagined music-family wish-videos-kept-playing4

Expected result

Hide various youtube nag popups

Reproduces how often

Easily reproduced

Brave version (brave://version info)

Every Brave ver

Channel information

Reproducibility

Miscellaneous information

Currently being tested and used in Fanboy Annoyances. https://github.com/easylist/easylist/blob/master/fanboy-addon/fanboy_annoyance_specific_hide.txt#L1002

ballo commented 2 weeks ago

What about the popup that complains about ad blockers? image

ryanbr commented 2 weeks ago

That popup is technically blocked already, not using any extensions? Would try clearing cookeis/cache, don't use any other YT/Privacy extensions.

ballo commented 2 weeks ago

That popup is technically blocked already, not using any extensions? Would try clearing cookeis/cache, don't use any other YT/Privacy extensions.

It definitely isn't blocked. It doesn't pop up often, but it is annoying when it does.