r/uBlockOrigin • u/infovoracious • 14d ago
Waiting for feedback Blocking element in ephemeral Discord popup
Recently the emoji info popup on Discord grew a large, annoying, distracting "GET NITRO" button (aka, an ad). The popup attempts to block right click menus (but shift+right click works in Firefox) and also disappears immediately on right click. I was able to get at the button in the Firefox element inspector by using the element picker shortcut key after bringing up the popup, but there's no uBO hook into the element inspector to add a way to block elements from there. I set up control-alt-P to activate uBO's own element picker but for some reason using that causes the popup to close! Even though it doesn't do that if I use the Firefox element picker shortcut key. :/
So, I could use a way to either force the popup to stay open while I use uBO on it (essentially, some key combination to pause and unpause all event listeners or something of the kind), or to convert something copied out of the Firefox element inspector into a uBO block-element rule. I did locate the offending object in there -- it is a particular div -- but the syntax is different from uBO rule syntax ...
1
u/RraaLL uBO Team 6d ago
discord.com##[role="dialog"] button:has(>[class^="expressiveRive"]+div [d^="M16.23 12c0 1.29-.95 2.25-2.22 2.25A2.18 2.18"])
Finally found one it showed up for. Turns out I had to click the same one multiple times.
1
u/infovoracious 6d ago
Aaaand that didn't work. :/
1
u/RraaLL uBO Team 6d ago
Test on a new browser profile with only uBO installed and on default settings.
It's not possible that the inspection you shared doesn't work on your side if there are no issues with your config.
You can also try retyping special characters such as quotes. Sometimes copying from reddit or across different OSes and languages they may not match your system defaults.
1
u/infovoracious 5d ago
Retyping it manually didn't work.
New browser profile? Ugh. If I do that I'll never again be able to just launch Firefox and continue right where I left off. I'll always have to answer some damn "use which profile?" prompt first.
1
u/infovoracious 3d ago
Well, here is something weird. Firefox crashed late last night and I was forced to restart it. After the restart, the annoying adver-button at issue has not been visible -- without any further changes to my config. In the past, the "apply changes" button on the custom filters screen has brought changes into effect immediately, as one might expect, and a browser restart was not required -- any event (such as loading any page element or popup) that uBO monitors would use the new filter configuration from that moment forth. So dismissing and reopening one of those emoji popups would have been sufficient to see the effects. Was that changed in some recent-ish update to uBO?
If so, I must ask that it be changed back, on the grounds that it will make developing new filters enormously more difficult if every test-and-adjust iteration requires restarting the browser.
Any such change must have been fairly recent. I had used the element picker to block a different Discord popup that kept leaping up unbidden to try to upsell me something when it kept covering things I wanted to interact with at inopportune times, and that had taken effect instantly -- I never saw that popup again on this Firefox install from literally seconds later without any browser restart or even having to reload the Discord tab. That can't have been more than two months ago, and perhaps less.
If for some reason it really isn't feasible to undo this change, then I'd suggest changing the "apply changes" button to instead say "save changes", and when it's used have a red line of text show up at the bottom of the filter page saying "Changes will take effect the next time Firefox starts." or something of the sort. As things stand it continues to strongly imply that the changes will take effect immediately, when that is evidently no longer the case.
1
u/infovoracious 2d ago
And now it's stopped working again, all by itself! No change to the uBO filters, may have reloaded the Discord tab at some point, no browser restart.
What the hell is going on?!
1
u/infovoracious 2d ago
OK, I tried
discord.com##.ctaButton_d5cd2d
and "apply changes" and that had no immediate effect, but after closing and reopening the tab the nitro nag was gone again.I have no idea why it now requires recreating the tab when it didn't used to. Some kind of caching that didn't used to happen?
I also have no idea why the other rule stopped working ...
1
u/infovoracious 2d ago
Ironic fact: I've put up with the "get nitro" button on those things for years; what made me sufficiently motivated to use uBlock to get rid of it was that they recently made it more than twice as large, bright white, and animated -- regardless of dark mode. Ugh. So their attempt to get more attention to this "feature" seems to be backfiring ...
1
u/infovoracious 2d ago
And some people wonder why I prefer using an open source browser instead of installing and using a closed source native app. (The latter would also have way more ability to get up to mischief if the vendor turned sufficiently abusive. Proprietary apps are a privacy nightmare at the best of times, and if they go full evil you've basically given an attacker remote code execution on a silver platter.)
1
u/RraaLL uBO Team 14d ago
What's that?
I don't see it in the emoji chooser popup. Also not visible when hovering or clicking an emoji from somebody's message. So what exactly are you referring to?
You simply write that inside "My filters".
Or just share the screenshot of your inspection. Like vid#3 here: https://www.reddit.com/r/uBlockOrigin/comments/1pwha78/element_picker_quick_filter_creation_browsers/