mchangrh / yt-neuter

uBlock filter(s) list for blocking unwanted YouTube elements
https://neuter.mchang.xyz
The Unlicense
182 stars 13 forks source link

Filter Update: Block youtube "enhanced bitrate Premium" popup spam #49

Closed XxUnkn0wnxX closed 9 months ago

XxUnkn0wnxX commented 9 months ago

a while ago I started to get harassed by these every single time I seek or paused any video bqcabVq

you can see how often i get spammed by this video demo.

now i think I've got the rule setup right:

youtube.com##ytd-popup-container > tp-yt-paper-dialog:has(ytd-offline-promo-renderer)
youtube.com##.opened

the .opened class is to stop the black flicker every time ublock or any adblocker blocks the main element. its very noticeable.

I'm mainly using your sponsor block as i find the main one too aggressive for my needs.

mchangrh commented 9 months ago

Interesting, I'll try to replicate it and check if I can find it in the source code

mchangrh commented 9 months ago

I believe it might be ytd-video-quality-promo-renderer, can you try that instead?

youtube.com##ytd-video-quality-promo-renderer
XxUnkn0wnxX commented 9 months ago

I believe it might be ytd-video-quality-promo-renderer, can you try that instead?

youtube.com##ytd-video-quality-promo-renderer

nah I still get the popup with that, I'm pretty sure it's ytd-offline-promo-renderer

you can also do it via

youtube.com##ytd-offline-promo-renderer

however

youtube.com##.opened

still needs to be blocked to stop the annoying flickering.. the black fade or drop shadow of the entire video player window when a popup overlay is present.

Also, i think tp-yt-iron-overlay-backdrop is responsible for the backdrop flicker thing, been playing around with it & its just as effective as the .opened class.

it's both div element ID & class

Screen Shot 2023-11-27 at 4 44 07 pm
mchangrh commented 9 months ago

oh okay, the HTML dump helps a lot, let me see if I can target the parent instead

mchangrh commented 9 months ago

how's

youtube.com##ytd-popup-container:has(>tp-yt-paper-dialog>ytd-offline-promo-renderer)

that should block the popup, if you could send the HTML for the overlay backdrop that would be great, I'm hesitant to block something as large as the overlay-backdrop and I don't see any flags I can enable to reproduce your personal hell of premium popups

XxUnkn0wnxX commented 9 months ago

how's

youtube.com##ytd-popup-container:has(>tp-yt-paper-dialog>ytd-offline-promo-renderer)

that should block the popup, if you could send the HTML for the overlay backdrop that would be great, I'm hesitant to block something as large as the overlay-backdrop and I don't see any flags I can enable to reproduce your personal hell of premium popups

ya youtube.com##ytd-popup-container:has(>tp-yt-paper-dialog>ytd-offline-promo-renderer) works

if you want here is the whole page dump with no filtering on how it renders for me: page dump.html.zip

but ya the flickering still occurs without blocking tp-yt-iron-overlay-backdrop at least. I cant find where it shows in a HTML element specifically as it only pop's up on screen for a moment every time you seek through the video so it's not constant. I think there are some scripts that handle the backdrop element ID/class.

NM found it..

Screen Shot 2023-11-27 at 5 55 51 pm

I think its safe to kill tp-yt-iron-overlay-backdrop this only active when ytd-offline-promo-renderer is active, otherwise when blocked it pops up very fast & disappears. & keeps trying to render every time ytd-offline-promo-renderer is blocked when seeking through the video.

mchangrh commented 9 months ago

I think

youtube.com##tp-yt-iron-overlay-backdrop.opened

would be the best of both worlds 😆 - catches backdrop and .opened

if there are no issues, I'll also merge it in without opened for better compatibility

mchangrh commented 9 months ago

added in https://github.com/mchangrh/yt-neuter/commit/979f38a01592ff1509d10cfd24cf2f20b1d40dcf - thanks!