this post was submitted on 31 Mar 2025
25 points (100.0% liked)

technology

23635 readers
285 users here now

On the road to fully automated luxury gay space communism.

Spreading Linux propaganda since 2020

Rules:

founded 4 years ago
MODERATORS
 

I've been slowing building a kind of "tool box" for myself using Tampermonkey, that makes the LemmyUI do some stuff I wanted. I finally have it in a stable place and wanted to share it with everyone. You can see the repo above, or read below.


Reds-Lemmy-Tools

This is a userscript that can be used with Tampermonkey or other userscript plugins.

Features

This small utility adds the following features to the LemmyUI.

  • External Community Highlight
  • URL post "Quick Search" button in post feed
  • Auto-Closes the Subscribed Communities sidebar.

External Community Highlight

Posts in the feed that are made in a federated community will be highlighted. I implemented this so I could distinguish local posts from remote posts in the feed. See the screenshot below for an example of what this looks like.

URL post "Quick Search" button in post feed

I also call this the "Combat Liberalism" button.

Posts that have an external URL as part of their post will have a ๐Ÿ” icon in the post's action button area. This button will open a new window to your instance's search page, searching on the post's URL. I implemented this because the "Cross Posting" feature of the UI is frankly strange. Instead of some explicit "Cross Posting" list, I would rather just see where else the post's URL has been posted across federated communities. So, this search button will show you exactly that. This way you can find out where else this conversation is happening, and engage with or read other comments on the topic.

Search Button:

Search Results:

Auto-closes the Subscribed Communities sidebar

This one does what it says on the tin. My subscribed communities list is massive, and it stretches on forever, it feels like. This simply clicks that minimize box for me when the page loads.

Notes

  1. The default match query is for Hexbear.net. You will want to update that with your preferred instance. // @match *://hexbear.net/*
top 4 comments
sorted by: hot top controversial new old
[โ€“] AernaLingus@hexbear.net 2 points 2 days ago (1 children)

Thank you for creating and sharing this! The Quick Search feature is especially useful; the "other discussions" tab was always one of my most-used features on reddit.

This doesn't warrant a separate post, but for my fellow Hexbears who would prefer a centered layout, use an extension like Stylus to make a custom CSS stylesheet with the following rules and apply it to hexbear.net:

.container-lg {
  max-width: 1320px !important;
}

.inbox.container-lg {
  max-width: 1000px !important;
}

Strictly speaking, the second rule isn't required, but since the sidebar isn't present in the inbox it gets a bit too wide for my tastes if I only use the first rule. 1320px is the default value used on other Lemmy instances (I think), while the 1000px value was semi-arbitrary (just me eyeballing how much room the sidebar takes up and picking a nice number), but you can of course change those to suit your preferences.

[โ€“] RedWizard@hexbear.net 1 points 2 days ago

That reminds me. I usually brows from my vertical monitor, but when I go to post everything is very compressed due to the way the grid is laid out on the submission page. I should fix that.

Good addition would be hiding the thumbnails when auto-expanding images are enabled

[โ€“] starlight32@hexbear.net 3 points 2 days ago* (last edited 2 days ago)

this is cool mario-thumbs-up im actually working on a similar thing but more for styling the site though its reminding me why i dont like using vanilla js for frontend stuff