Reddit notifications dropdown

add notifications dropdown to reddit

< 脚本 Reddit notifications dropdown 的反馈

评价:好评 - 脚本运行良好

§
发布于:2025-09-26

Hey this is the OP of the r/userscripts thread who requested this script! Thanks so much for putting this together; haven't had a chance go try it out yet BC I'm on mobile (and it doesn't seem to work on mobile web reddit, at any rate, not even in with Request Desktop Mode...)

Is there any reason you deleted your comment about this script from that thread?

hdyzen作者
§
发布于:2025-09-26

Hey, thanks for the feedback, I updated the userscript and tested it in Firefox Mobile, it's working.

Is there any reason you deleted your comment about this script from that thread?

What do you mean? My comment is on Reddit: https://www.reddit.com/r/userscripts/comments/1npytw6/comment/ng47pdf/

§
发布于:2025-09-26

> My comment is on Reddit: https://www.reddit.com/r/userscripts/comments/1npytw6/comment/ng47pdf/

Yeah, that shows up to me as "[deleted] Comment has been removed." (Same thing if I open that link in a private tab, so I don't think it's because either of us has the other blocked or anything...)

§
发布于:2025-09-26

...anyway, it still doesn't work for me on mobile :/ It just shows a transparent window with a button that says "Try again." (and when the extension is loaded, other parts of the reddit DOM fail to load, such as comments; see screenshot)

Does this script rely on anything that might be broken by e.g. Firefox's FingerprintingProtection?

§
发布于:2025-09-26

My comment is on Reddit: https://www.reddit.com/r/userscripts/comments/1npytw6/comment/ng47pdf/Yeah, that shows up to me as "[deleted] Comment has been removed." (Same thing if I open that link in a private tab, so I don't think it's because either of us has the other blocked or anything...)

Same issue with https://old.reddit.com/r/userscripts/comments/1npytw6/userscript_to_make_reddits_notifications_button/ng47pdf/

hdyzen作者
§
发布于:2025-09-26

I see, I have Firefox Fingerprint Protection set to strict and I don't have this issue. Maybe it's conflicting with another extension.

print

hdyzen作者
§
发布于:2025-09-26

In Firefox

§
发布于:2025-09-26

Ok that's good to know, I'll mess around with my mobile settings. On desktop it works, but still breaks some stuff in the DOM like the other buttons in the upper right, the sidebar on the left, and prevents scrolling/loading more posts on the homepage (see screenshot). But since it looks like it works fine for you, I'll mess around a bit more with my FF settings before complaining to you.

§
发布于:2025-09-26

...Ok. I'm actually back to complain to you, sorry lol. I tried installing it in a brand new Firefox profile and it still has the bugs described in my last comment/screenshot. I don't think there would be anything on my Windows installation that could affect this; I *am* using a VPN, but that doesn't seem like it should have any influence on stuff in the DOM??

Can you tell me what extensions or FF preference tweaks (user.js, about:config) YOU have installed? And what userscript manager do you use?

hdyzen作者
§
发布于:2025-09-26
编辑于:2025-09-26

Sure, I am using:

  • Violentmonkey 2.31.0
  • uBlock Origin 1.66.4
  • Stylus 2.3.16

As for user.js, I don't use, and regarding about:config, I use it with default settings.

Let me explain how the script works. Basically, it "creates a page," which is an iframe inside the current page, with the URL: https://www.reddit.com/notifications?dropdown=true. Then it applies CSS to display only the notifications. In fact, if the script is enabled and you visit the URL https://www.reddit.com/notifications?dropdown=true, only the notifications should appear. From the screenshot you sent, the issue is that the CSS is not being applied. The CSS is applied using a method provided by userscript managers such as Violentmonkey, Tampermonkey, Greasemonkey, among others.

§
发布于:2025-09-26

(I use FireMonkey and on line 22 it says "UTS is undefined." I don't know enough about to JS to know what UTS is or how to fix it; I tried google-searching about UTS or the onElement method and couldn't find anything promising. I also tried installing VioletMonkey as my userscript manager instead, and while it did not throw any errors in the code, it also just... didn't work. When ViolentMonkey had the script loaded (and FireMonkey was disabled), clicking the notification icon just navigated to the Notifications page like normal)

§
发布于:2025-09-26
编辑于:2025-09-26

Saw your comment after I posted mine and tried to edit it but ran out of time, ugh

In fact, if the script is enabled and you visit the URL https://www.reddit.com/notifications?dropdown=true, only the notifications should appear.

This worked as expected! So it seems like maybe something is interfering with the main Reddit page's own CSS. Could this be related to UTS.onElement?

hdyzen作者
§
发布于:2025-09-26
编辑于:2025-09-26

This worked as expected! So it seems like maybe something is interfering with the main Reddit page's own CSS. Could this be related to UTS.onElement?

I think it could be.

I just updated it, try this version: https://greasyfork.org/scripts/550666?version=1667393

§
发布于:2025-09-26

I just updated it, try this version: https://greasyfork.org/scripts/550666?version=1667393

Works perfectly now, thanks so much!!

§
发布于:2025-09-26

...oh could I make one last request? When clicking on a notifcation in the dropdown window, it navigates to that post *in the dropdown window.* Is there any way we could make it navigate to the clicked post in the main tab, not just within the iframe?

hdyzen作者
§
发布于:2025-09-26

Right, I know it was a problem with the script when using FireMonkey — it doesn’t execute scripts in iframes unless the script declares this (@allFrames). I’ve updated it, so it should work with FireMonkey now.

...oh could I make one last request? When clicking on a notifcation in the dropdown window, it navigates to that post in the dropdown window. Is there any way we could make it navigate to the clicked post in the main tab, not just within the iframe?

Sure, I think this behavior is better too, so I’ve updated the script: https://greasyfork.org/scripts/550666?version=1667410

发布留言

登录以发布留言。