A QT3 on Discourse User Script

User Script? (includes a link to more comprehensive install instructions)

Userscripts (a.k.a User Scripts, User scripts, or .user.js) are open-source licensed add-ons for web browsers that change web pages as they are loaded. They give users the power to make websites do what they want them to, rather than what was originally intended. This kind of script is usually file named on your computer as site it affects - what useful name you want to call it.user.js and always does end in .user.js.

Useful tasks like improving layout, fixing bugs, automating common tasks and adding new functions can all be done by userscripts. More complicated userscripts can create mash-ups by combining information from different websites or embedding new data into a web page, e.g. to add reviews or price comparisons to a shopping website.

Text and better install instructions here:
From this page: https://github.com/OpenUserJs/OpenUserJS.org/wiki/Userscript-beginners-HOWTO

Install instructions (summary):
After you install TamperMonkey (Chrome), or GreaseMonkey (Firefox) and then click the link below, it will ask you if you want to install the user script. Say yes, and you’re good to go. If it’s the first time you’ve installed TamperMonkey or GreaseMonkey, then try to restart your browser if it’s not working right away. If you have any other issues, also try to close the page and reopen it first.

Here is the link you click for the user script (once you can install them via GreaseMonkey/TamperMonkey): https://github.com/matthewboonstra/qt3UserScript/raw/master/QuarterToThreeDiscourseForumHelper.user.js

If you want to review the source to check for funny business, feel free: https://github.com/matthewboonstra/qt3UserScript/blob/master/QuarterToThreeDiscourseForumHelper.user.js

What does it do?

1 . Gives an option for real “muting” for users.

Thanks to Diddums for the sample screenshot, no I didn’t mute him. What you do here is you click someone’s name on a post to get their user card, and on that card will be an option to Mute User. This ties into Discourse’s muted users option in settings, which only mutes notifications for when they tag you, I think. The script supercharges it and blurs their posts:

You can click to reveal the post. It uses that muted users line in your settings so it will just add names there and use that settings line to auto-blur posts. Want to unmute them? Then click the Unmute button in the same place you found the Mute button.

2 . Absolute dates on posts

This will be an option you can pick in the next version, but for now it just automatically changes all the relative dates (i.e. “28m”, “9h”, “3d”) to absolute ones (“i.e Aug 10, 2016 2:32 pm”). You don’t have a choice.

That bit is for me. Thanks, @stusser.

(Reorganized this post and history bit is now below since it’s old news.)

Historical text (irrelevant now)

So I wrote a script a while back for the old site, here’s the old thread:
My Qt3 Enhancements User Script (for ignoring threads, entirely local)

which kind of handled some things I really thought the old vBulletin site needed. The most important of which was the ability to flag a thread ignored and never see it unless you clicked a button to show the threads you’d ignored. As you might guess, the move to Discourse completely obviated the need for such a script. But it did present an opportunity for new things to change. As Discourse evolves, many of the changes my script makes will also become obsolete, but I think there are also some choices in this software that probably won’t ever be changed that I believe the user should be able to decide as a preference.

So I made a new script for the new site. I made some posts over in the Stylish theming thread here when I was working on it, and some of you are already using it (thanks for the feedback):
The Stylish/User CSS library (wiki post!)

But maybe it’s time I make a thread just for it so people can find it if they want it. So, here’s that thread.

Obsoleted features

1 . (Obsolete) Enables night theme as an option (if you want different theme options and have CSS for them, send me a PM and I could add more) Discourse has this already on the roadmap, so it will go the way of the dodo hopefully soon.

Go to your user settings page:

And at the bottom you should see an option for themes.

Click Night theme and then “Save Changes” and voila (you need to refresh for other tabs you have open):

Thanks to @Sam_Jones for his stylish css here The Stylish/User CSS library (wiki post!) that I grabbed for this and @Fishbreath for starting/managing the stylish thread where these themes were worked on.

2 . (Obsolete) Fixes Youtube video full screen bug where it blows up periodically and kills the video

Actually, there is still an issue with this and it’s somewhat unnecessary now. @eviltrout made a Discourse version of the hack I made for this and added it to Discourse proper (thread post here: Discourse Changes & Enhancements) but I noticed there are other things that break full screened Youtube videos :(

Specifically if you are watching a fullscreen video and someone posts something new or edits a post in the thread, it will kill your video when it refreshes the page to update the screen (since it causes the scroll event to fire). I think some other polling events might kill it too. My code is still in the script, but the part that it fixes is probably already in Discourse now and unneeded, so I’ll probably cut it out later after testing. Not sure what to do about the new post/refresh problem, I think I’d have to edit the actual Discourse source to fix that one from killing your full screened videos. I’d still recommend clicking the YT video title and open it on youtube itself for full screen for now.

The Muslim Ban: America Loses Its Mind.
Hey, how can I get Discourse to do X?
Suggestions for future improvements to our forum software
Tax Reform Under Trump 2017
Games Journalism 2018: We're taking it back!
Hey, how can I get Discourse to do X?
Hey, how can I get Discourse to do X?
Suggestions for future improvements to our forum software

Great work on this @arrendek – can I return the favor by contributing something for your effort to make things more awesome here … PayPal?


Wow, I’m flattered. I don’t really know. I’ve gotten used to getting paid for programming stuff, I mean, it is my job now. But I never really thought about that for this script, I just spend a lot of time here.

Let me think about it and PM you, if you don’t mind.


Sure PM me. You’ve been doing great work, consider the bug with the YT videos that you helped us fix.


I don’t plan to use this, but I would change your user mute from blur to details. The full post blur is nasty looking. I’ve suggested before that Discourse suggest the hide details option instead for full spoiler posts.


I just tried it. Installed TamperMonkey and then the script. The user dates are still the way they always were.


Maybe restart your browser? I Just manually updated my copy of the script and it’s working alright.


Ah that’s probably it. I’m at work, and have too many important tabs open with data I’m working with. So I can’t really restart the browser right now. I’ll try it when I get home on Firefox.


Thanks, arrendak!

Uh, I’ve looked and can’t seem to find where to change/set the Theme?


You do probably need to restart your browser if it is the first time you’ve installed TamperMonkey or GreaseMonkey. What browser are you using?


I already have Tampermonkey in Chrome and was using it for something else.


That was the reply for eight rocks man.

It’s in user settings. I updated the original post.


Thanks, @arrendek! Dropped this in to replace the old Stylish script I was using and it’s working great.


Thanks. Found it at the bottom.


Just FYI with the night theme, I don’t know if @Sam_Jones “finished” it, I know some pages are formatted a little imperfectly (i.e. user settings page). If anyone wants to riff on the CSS I am happy to either modify the night theme with improvements or add a new theme option with different CSS (for example, if you have your own Stylish CSS), just PM me.


I’ll look at making that an option in the future if people want it. It’s a good idea.


A virtual plus one for still being awesome. I had noticed the absolute date changes in passing and thought “huh, that’s neat” but had no idea it was part of arrendek’s script auto-update. I love Discourse on mobile, especially compared to the old site, but arrendek’s work takes Discourse on the desktop to another level.




Hilarious workaround identified.


Finally, a post actually worthy of a +1likething