kbin enhancement script: Userscript to collapse comments and add domains to names

https://greasyfork.org/en/scripts/468612-kbin-enhancement-script

Just a quick and dirty userscript to add some features I feel are super important. I'll probably look into creating some real PRs, but I figure the devs are probably in "put out fires" mode right now.

EDIT:
Added a few more features and cleaned up the expand / collapse UI. All features are toggleable in the kbin sidebar.

115 points · 53 comments · view on lemmy.world

53 Comments

Ozycaevias@kbin.social · 6 pts · 3y (1 reply)

This is a big QoL thing, and I appreciate you putting it together. Hoping to see it become standard functionality on Kbin in the future.

astrodad@kbin.social · 2 pts · 3y

I agree! Please make this happen, powers that be that have the knowledge to do this.

pushka@kbin.social · 6 pts · 3y

I have made this same script for beehaw / lemmy (by same, i mean adding community name after username only)

https://greasyfork.org/en/scripts/468708-beehaw-lemmy-add-home-instance-name-to-username

arkcom@kbin.social · 5 pts · 3y (8 replies)

Can you make this two scripts with separate functions? I currently use https://greasyfork.org/en/scripts/468460-kbin-collapsible-comments and like the clickable comment header.

pushka@kbin.social · 4 pts · 3y (4 replies)

Great minds think alike - I just made the same thing, adding domains only

https://greasyfork.org/en/scripts/468704-kbin-social-add-home-instance-name-to-username

preview
https://i.imgur.com/yDRC4Ao.png

McBinary@kbin.social · 2 pts · 3y (3 replies)

Thanks for this. Is it possible to change the color of the home instance to be more noticeable? Also I think the "@" is being dropped from the replace.

I assume its would need to be in this line, but it's been 20 years since I coded anything and have no idea what script language this is.

var homeinstance2 = homeinstance.replace( "/u/@" + myname + "@" , '');

pushka@kbin.social · 2 pts · 3y (2 replies)

Hey - with the dark and light mode - I'll take a while to change the colour - for now I've made it in italics, so if anything - a 2nd script can change the colour of the community name

it's showing

name - community

not breaking up the users URL / address with a dach

name - @community

it's possible to make it

name@community - but that's less readable

McBinary@kbin.social · 1 pts · 3y (1 reply)

Thanks a ton for doing that. I appreciate it. I'm just having difficulty noticing when I'm replying to people on other platforms, so some assumed knowledge gets left out when not knowing who I'm speaking to.

pushka@kbin.social · 2 pts · 3y

I'll add two red colour styles tomorrow which changes brightness based on dark mode or not

raltsm4k@kbin.social · 2 pts · 3y (1 reply)

The script adds toggles for both features under the settings area so you can just toggle off comment collapsing if you already have a script that does that.

dimspace@kbin.social · 1 pts · 3y

oooh.. its an icon to the left of search.. i was looking underneath per the screenshot lol

SirPsychoMantis@kbin.social · 2 pts · 3y

You can turn on and off features in the kbin settings sidebar

Otome-chan@kbin.social · 4 pts · 3y (1 reply)

@SirPsychoMantis I found a bug. It seems to not show the url while looking at microblog posts. only in threads.

SirPsychoMantis@kbin.social · 2 pts · 3y

It should show it, however it won't show if the user / magazine is on your instance.

Twinax@kbin.social · 4 pts · 3y (1 reply)

Thanks a lot for the work !

There is a bug where if you click on the instance/community, then reload kbin, it will add another instance name in the name. For example : gaming@beehaw.org@beehaw.org@beehaw.org
And this infinitely.

SirPsychoMantis@kbin.social · 1 pts · 3y

Fixed, will be pushing out an update soon

lixus98@kbin.social · 4 pts · 3y (8 replies)

Can we get a screenshot of how it looks? Also I love the amount of effort everyone is putting towards this.

SirPsychoMantis@kbin.social · 6 pts · 3y (7 replies)

Here you go

Shortcake@kbin.social · 6 pts · 3y (2 replies)

@SirPsychoMantis its very clean. want to post this at m/kbinStyles so we can aggregate them?

SirPsychoMantis@kbin.social · 1 pts · 3y (1 reply)

Is there any way to cross post? Or should I just make a new one?

Shortcake@kbin.social · 1 pts · 3y

lol sounds like another https://codeberg.org/Kbin/kbin-core/issues issue

you could just link to your post here

CrimsonOnoscopy@beehaw.org · 1 pts · 3y (1 reply)

I note that on Lemmy, no image is visible on this post.

SirPsychoMantis@kbin.social · 1 pts · 3y

Ah interesting, I uploaded it directly rather than posting a link

SirPsychoMantis@kbin.social · 1 pts · 3y

Updated screenshot of the UI

AnonymousLlama@kbin.social · 1 pts · 3y

Looks pretty good overall. Hopefully we get some style updates too soon, because there's a heap of vertical space used in the current designs that could be optimized.

JonEFive@kbin.social · 3 pts · 3y (2 replies)

It's a shame that these scripts don't work fit Firefox mobile. That's where I do most of my... Well I was gonna say redditing. Kbining? 😁

SirPsychoMantis@kbin.social · 3 pts · 3y (1 reply)

I installed Tampermonkey on Firefox mobile (Android) and the script works great, minus one bug for long usernames that I'll try to fix shortly.

JonEFive@kbin.social · 1 pts · 3y

Really? Well now I need to check again, thanks for the heads up

DarkThoughts@kbin.social · 3 pts · 3y (4 replies)

Is there any script that keep the top level comment visible and only collapse the replies beneath? So far they seem to work all in the same way.

SirPsychoMantis@kbin.social · 3 pts · 3y (2 replies)

@DarkThoughts I added a feature to "toggle replies" to the top level comments

DarkThoughts@kbin.social · 1 pts · 3y (1 reply)

Is it possible to also have a collapse / expand all toggle for the entire comment section? Sort of like the Relay mobile client for Reddit.

SirPsychoMantis@kbin.social · 1 pts · 3y

Never used Relay, do you want to just hide the entire comment section, or just make every individual comment collapsed into just "Name [+]"?

Yabai@beehaw.org · 1 pts · 3y

This had both collapsing and hiding replies: https://greasyfork.org/en/scripts/468449-kbin-collapsible-comments

Bipta@kbin.social · 2 pts · 3y (1 reply)

Very cool. Is there a GitHub link? I'd love to contribute.

SirPsychoMantis@kbin.social · 3 pts · 3y

Just a quick script for now, I will probably focus on contributing to the actual codebase in the coming weeks.

Otome-chan@kbin.social · 2 pts · 3y

oh this is fantastic. thank you so much :) very useful to see where people are posting from.

Blakerboy777@kbin.social · 2 pts · 3y

Yeeeeaaaah boi! I just installed this and it's awesome! Thank you thank you thank you :-)

Grimlo9ic@kbin.social · 2 pts · 3y

Saw you post this last night but couldn't get around to testing it until today. Works great! I needed the collapse function, but showing the source domain is a great bonus and adds clarity to kbin.

Kaldo@kbin.social · 2 pts · 3y

Really happy with the script so far, do you take feature requests maybe? I think it'd be an easy thing to add - an option to hide "random posts" and "random threads" section from the sidebar. I keep getting porn shown there despite blocking communities, either I didn't get all of them or the block gets ignored in the random search. It doesn't even get blurred. For now I hid it with uBlock but I'm sure other people would appreciate it as a setting too.

Deref@kbin.social · 2 pts · 3y

I made a version that makes the instance name normal weight instead of bold. Think it looks better that way.

False@lemmy.world · 2 pts · 3y (2 replies)

Is it possible to use this on mobile Firefox? Not sure if userscripts work there or not.

SirPsychoMantis@kbin.social · 4 pts · 3y

Yep, Tampermonkey is available on Firefox mobile

Shortcake@kbin.social · 1 pts · 3y
[ removed ]
ngmi@kbin.social · 1 pts · 3y

Very cool and very needed!

Dav@kbin.social · 1 pts · 3y

Hey i just made a very rough one too, maybe I should have been looking for yours first, I've added expanding thumbnails to mine so feel free to intergrate that to yours.

pastebin link