this post was submitted on 21 Jun 2023
30 points (100.0% liked)

Kbin Userstyles and Userscripts

15 readers
1 users here now

Custom CSS and JS to help improve your Kbin experience! ### Userscripts Greasy Fork ### Stylesheets UserStyles.world ### Userscript managers

founded 1 year ago
 

https://i.imgur.com/va0ph9d.png

Changelog

0.8

  • Made cache and pinned subs user-dependent for those with multiple accounts
  • Made subscription list scraping a little more robust
  • Added loading and error indicators

0.7

  • Added a button to manually refresh the cache
  • Made alphabetical sorting default

0.6

0.5

  • Pins! Hover over a magazine and click the pin icon to make it always appear in a special section at the top of the list.
  • Panel now scrolls with the view even if sticky navbar is off

0.4

  • Now uses cache for faster loading, refreshes every 5 minutes or when you sub/unsub from a magazine
  • Added button to collapse the subscription pane
  • Fixed bug where only the first page of subscriptions would be read

0.3

  • Added filter by name

0.2

  • Added buttons to sort by date (default) or alphabetically
top 36 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 year ago (1 children)

Looking good! Is there any way to make the list sort alphabetically? Right now it's sorted by subscription date, I think, which is what kbin does as default. Either way, very useful and seems to be playing well with the other scripts I'm running. Thank you very much.

[–] [email protected] 2 points 1 year ago (2 children)

I just pushed an update that lets you switch between date and alphabetical sorting :)

[–] [email protected] 1 points 1 year ago

Amazing! I'll check it out later today. Thanks again!

[–] [email protected] 1 points 1 year ago

Awesome! Works just fine!

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Hm, some kind of caching might be a good idea to add. Granted it might not matter as long as few people use it, but it does double the load from users with the script, since every page load causes a second page to load.

Another feature that would be nice is to be able to choose which communities appear. I currently have more than a screen worth but most are ones I don't really want to have there.
And perhaps also rename them (to make Lemmy communities a bit less ugly, for example I have "askelectronics@discuss...." and "[email protected]...." showing up now.

Hmm... I might work on this a bit, since I realize this is a lot to ask :-) If that's alright.
I'm not an experienced userscript dev though.

[–] [email protected] 2 points 1 year ago

Added a cache feature in the latest version, hope it helps :)

[–] [email protected] 2 points 1 year ago (1 children)

@raltsm4k I've created a version that adds collapse/expand and search functions and (hopefully) fixes @marcf's problem. I can send you the code if you'd like to update your version.

[–] [email protected] 1 points 1 year ago

That'd be appreciated! I actually just finished coding a search feature a few minutes ago but the other changes I'd be happy to implement.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Nice, I've been wanting for something like this.

I noticed in your screenshot you don't have the Kbin top bar enabled (settings gear on the sidebar -> General -> Show top bar). That bar has a link called "Subscribed" that takes you to https://kbin.social/sub which I think you could link to from the your "Subscribed" title. The second thing for would be copying the toggle from old reddit (might be a RES feature): the first item is called "My subreddits" which toggles showing the subscriptions as a floating element so that it doesn't have to be visible all the time. Check the kbin enhancement script as to how you could add that as an option integrated to the Kbin settings panel if you want to so that users that do want it showing all the time can still do it.

[–] [email protected] 2 points 1 year ago

Pretty cool. Any chance to make it collapsible?

[–] [email protected] 2 points 1 year ago (1 children)

this is so awesome!! echoing the other persons request to make it collapsible

[–] [email protected] 2 points 1 year ago (1 children)

@minnieo @0rito
Added a collapse button in the newest version!

[–] [email protected] 2 points 1 year ago

and a search bar? you're a genius!

[–] [email protected] 2 points 1 year ago

So many nice little stuff like this for desktop even though im 90% on my phone. Still commenting so I can find this later when I'm desktop as this looks nice!

[–] [email protected] 2 points 1 year ago (2 children)

@raltsm4k
So, the subscription list is paginated, and it looks like only the subs on the first page make it onto the list. Is that intended? I don't think we can adjust where subs land in the pages by default.

[–] [email protected] 4 points 1 year ago (1 children)
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Awesome, thank you! Looks like it's pulling in everything now. And I like the "@lemmy.ml" tag! :D

[–] [email protected] 2 points 1 year ago

@raltsm4k i also love the tags showing where the subs originate from! thank you for adding that detail

[–] [email protected] 1 points 1 year ago

Having the same issue with both Floating Subs List and Kbin Subscriptions Panel. Unluckily for me, my most visited magazines are on the 2nd page.

[–] [email protected] 1 points 1 year ago

This is so helpful...thanks!!!

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

If "sticky navbar" is turned off the subscriptions box disappears out of view if you scroll too far down. I noticed on version 0.3 if I changed -

   position: on line 85 from "absolute" to "fixed"
   top: on line 86 from "100%" to "9.5%"  (9.5% didn't overlap with header and was aligned nicely across the top)
   max-height: on line 89 from "100vh" to "90vh" - "95vh" (I use 93vh) then the sidebar stays fixed as you scroll.

then the sidebar stays fixed in place as you scroll, even with sticky-navbar turned off.

The only thing I don't like is that with the fixed sidebar it will overlap the footer at the bottom. I'm not sure how to make it not overlap, I literally just started googling this userscript stuff like 45 minutes ago. I'm guessing making the z-value of the footer a higher priority then the sidebar would make the sidebar scroll beneath the footer, but I don't know.

[–] [email protected] 2 points 1 year ago

@Crayon8027
Pushed an update that fixes this - though I plan to add a settings menu soon that would let you choose to have it floating or scroll with the page, among other things.

[–] [email protected] 1 points 1 year ago
[–] [email protected] 1 points 1 year ago

There's a range of browser window widths where content is fully expanded, but the Subscribed sidebar stays rooted to the left. Eventually, at wider widths, the sidebar will detach and content moves to the centre, but it's never properly centred.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Thanks for this! It doesn't seem to show all my subscriptions though from Kbin, or subscriptions from other servers. Is that possible? Sorry, I realize these are all federated so posts on one should populate on others, so scratch that. I know I've subbed to other communities from my /All, so I wasn't sure if those communities show up in my sub list as Kbin mags.

But, I still don't see at least one Kbin mag that I've subbed to in my floating sub list.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Thank you very much !

If you wanne add more or improve it, just some thoughts:

you could add a way to quick search the Subs - could be nice for people who follow alot of subs.

activity sings - maybe a dot behind subs with new post that i did not see yet ?

Indication what subs are moderatet by me.

[–] [email protected] 1 points 1 year ago (1 children)

Just what I was looking for – thanks! Unfortunately, seems to break when sidebar is positioned left in kbin settings. Subscriptions get pushed below the content.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Weird, that doesn't happen on my end, would you mind sharing your browser and any other styles/scripts you're running?
edit: Oh, it looks like you're using the other subscription panel script that was posted - mine is the one linked from this post.

[–] [email protected] 1 points 1 year ago

Wooooops, yup! Sorry about that. Guess I'll go post feedback for their script then :P

With yours, when the main kbin sidebar is aligned left, you end up with two sidebars, then the content block. Would it be poss to integrate Subscribed with the kbin sidebar?

[–] [email protected] 1 points 1 year ago

this is cool. any way to have it scroll with the page rather than in a fixed position?

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Anyone having issues with this script now? It seemed to be working last night but now my subs list isn't populated. The Kbin Subscriptions Panel script seems to be working.

Edit: Nevermind, they started showing up again. Weird.

[–] [email protected] 1 points 1 year ago

I had this same problem, but it turned out to be server lag issues. It only happened while kbin.social was having some serious issues loading.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Nice work, thanks! I am not seeing a Pin icon when hovering over a magazine name in the subscribed panel list. I am using the Vivaldi browser, and version 0.6.1 of Floating Subs List.

[–] [email protected] 2 points 1 year ago (1 children)

It appears, very faintly, over the icon of the magazine, to the left of the text. Nothing?

[–] [email protected] 3 points 1 year ago

@RodPhoto , @raltsm4k

Thanks! I can now see and click the Pin when hovering over the left side magazine's icon.

[–] [email protected] 0 points 1 year ago

This works really well and looks great! Thank you for making this!

load more comments
view more: next ›