r/Littux • u/Littux • Mar 19 '26
Fuck Spez / Fix Reddit I made the old mod.reddit.com mod mail client work again. You can continue using it by installing a userscript
(Originally meant to be posted to r/ModSupport. Posted here since it can't be removed)
Install the Tamper Monkey extension (firefox / chromium), and install the userscript: https://greasyfork.org/en/scripts/570323-mod-reddit-com-revived
Then visit https://mod-reddit-com.netlify.app/mail/all OR self host it by just running a single python file: https://github.com/Littux-Dustux/mod-reddit-com/. The localhost version will be at http://localhost:44444/. Instructions are given on the git repo
Issues
- The user pane doesn't display karma, profile picture and trophies
- If on the website and it isn't localhost (self hosted), websockets won't function, so typing indicators in mod mail conversations won't work
Toolbox doesn't work (since it won't run on the URL)
- I'm making a fix for this in my toolbox fork (since development stopped)
Improvements
- Bug fix: if you archive/highlight/mark read more than 50 conversations at once, it will split it into multiple network requests. You will no longer get an error
- Performance improvement: Going from "All" to "Inbox" to "New" to "In Progress" etc no longer reloads the page, and immediately loads
FAQ
What is the userscript for?
- It handles the authentication and bypasses CORS policies. It redirects reddit.com/mail/* to the archive page
Is the website (netlify) safe?
The website only contains an index.html and this file, which redirects all URLs to the same file:
[[redirects]] from = "/*" to = "/index.html" status = 200 methods = ["GET"]You can self host for maximum safety
Why am I getting a white screen?
- The app crashed for some reason. Please contact me if that happens
Why is it stuck at "Waiting for event from userscript"?
- The userscript crashed or isn't running. Make sure it ran by checking the tampermonkey menu
More Info
Before Reddit shut down mod.reddit.com, I archived the full page source. Since it is a single page application, it only needs to load some JS bundles to display content.
But the complex part isn't that. During the first load, the data for a page is "preloaded" into the window.___r object. Normally, it's done by Reddit's servers. But there is no server to bundle it now, so the inline script on the page does the loading instead, and delays loading of the JS bundles until then. So it has a loading screen now.
Until yesterday, it worked 100% fine until Reddit killed "gql.reddit.com" right in front of me while I was finalizing the archived version. The conversations completely stopped loading. There was a constant error message on the top. It is an API used for mod notes, saved responses and the user pane. The new GraphQL endpoint they use is "gql-fed.reddit.com" in the mobile app. Luckily, I had extracted all the available query information from the mobile app. I was able to map most of the old operations to the new ones.
Except for one (RedditorsInfoByIds), which is used for the user pane. There is no equivalent for it that I can find and I would need to extract data from multiple places to create an equivalent response. And I also don't know how the object looks like (since the dumb me didn't archive it hoping that gql.reddit.com would stay around forever). gql.reddit.com is what powered new.reddit.com (RIP), so after mod.reddit.com was also sunset, there was nothing using it, except ancient reddit app versions.
I said I only had time to work on this after March 30, but I had time the last few days, so I completely used them for this, because otherwise I won't be able to look at mod mails
•
u/Littux Mar 20 '26 edited Mar 23 '26
Edit 3:
100% features now work
You need to update the userscript to v1.3 or above to continue using it.
Changes
isVerifiedistrue. Full trophy fetching can be enabled from the tampermonkey menu)filter: NOTE(fixes oversight made by reddit engineers)modmail_recruiting_folderexperimentThere are a few more issues:
These aren't big deal breakers, so I'll focus on fixing the comment GIFs on Old Reddit with a userscript first
Edit: I updated the loading screen. It now shows loading progress for each API endpoint
Edit 2: User pane is fixed. Only the trophies are missing, which I won't bother adding in, since they're mostly useless
4
u/Littux Mar 19 '26
Pinging some people that asked for a reminder:
u/baseballlover723 u/Merari01 u/RemarkableWish2508
I haven't posted this on r/ModSupport, since I don't want it to get unwanted attention from admins
2
u/antioquiacraft Apr 04 '26
Thanks so much for this workaround. I'm having an issue. localhost:44444 doesn't resolve. I get this:
https://ibb.co/kVwXFdRj
1
u/RDSVII Apr 08 '26
Not really sure what you did but old mod. mail is lightning fast, even faster than what it was before Reddit killed it. Thank you very much for this, very grateful to have it back.
Is this something that is going to need ongoing support from you to keep it working? Should we follow this post or some other spot for news/updates?
3
u/Extolord111 Mar 19 '26
Working mostly well for me too!
Your member counter script is still having the issue where the counters won't appear on the www reddit links unless I do the sh-to-www switcharoo, though even those go away after a while. No pressure to fix it immediately, though, I'm sure stuff like this takes time to develop/code. Only other extension I have is the UI Changer For Reddit, which I'm still using since I prefer the images being loaded on i.redd.it instead of the default Reddit image viewer.
Also, u/RVL-003 stated that they were able to migrate a gql.reddit.com based app version to gql-fed.reddit.com (as a proof-of-concept thing), so they are hoping to do that with one of the New Reddit versions as well.
Funny that gql.reddit.com's deprecation occurred a mere six days before New Reddit's second death day (where the /web/r/*/submit endpoint we were using as a workaround got killed)
3
u/DustyAsh69 Mar 20 '26
u/Littux comes in clutch again 🔥
2
u/Obi-Paws-Kenobi Apr 02 '26 edited Apr 02 '26
Hey, I'm not very good with this stuff, but I did the following:
All I'm seeing is a loading screen with a 'Please wait, Loaded init script, getting authentication token..." and loading animation for every api endpoint on the page.
EDIT: Got it working on Firefox. Chromium browsers won't work.