Skip Navigation

Lemmy Universal Link Switcher rewrites all links to Lemmy instances everywhere to your home instance! Now rewrites post/comment links! 1.2.0 Release!

cross-posted from: https://lemm.ee/post/530162

Please report issues with this version either here or at the issue tracker.

Changelog v1.2.0

  • Add rewrite support for posts/comments
  • Try to not rewrite federation links

Description

Lemmy Universal Link Switcher, or LULs for short, scans all links on all websites, and if any link points to a Lemmy instance that is not your main/home instance, it rewrites the link so that it instead points to your main instance. Currently only works for community/user links.

Also works on Firefox Android with the Tampermonkey extension!

Features

  • Rewrite links to Lemmy posts/comments to point to your home instance. Only after hovering over them, because getting home posts/comments links require communicating with the Lemmy servers, and we don't want to spam the servers.
  • Instantly rewrite all links of communities or users to Lemmy/kbin on all websites everywhere to your new instance! The rewritten links will have an icon next to it, and hovering/touching the icon will show you the original link, allowing you to go there if you want to.
  • If you are already on a page that has a corresponding page on your home instance, a link will automatically be added to the page header.

Home Instance Setup

Simply visit the Lemmy instance you want to set as your home while the script is active. You will be asked if you want to set this instance to your home instance:

If you initially set your home instance wrong or just want to change it, no worries - simply go to your settings on your new home instance and press the button for it!

Coming soon

  • Rewrite kbin post/comment links
  • Better rewriting support for kbin community/user urls (e.g. sort options are currently ignored)
  • Nicer tooltip styling (fit into page theme)
  • Signify that "Show at home" button is loading for posts/comments
31 comments
  • I was just asking about yesterday how to do this. I'll have to try this out, thanks!

  • Thanks! I literally thought that I need something like this on the last post I browsed, scrolled down and here it is!

    I mostly browse Lemmy through RSS, and most of the links I use are from non-home instances.

  • So glad you put this together! I threw together my own as a temporary fix, but I don't actually know javascript so I've been waiting to see if someone would share a proper version. Thanks for the hard work on this!

  • Thanks for the good work @Azzu@lemm.ee

    One issue, I managed to do this:

    • Thanks for the report, yes, I actually noticed that already, sorry about that! I'm a bit busy today so I will probably only get around to fixing it tomorrow. I hope it is not too much of a bother until then, if it is, you can disable the feature completely by searching the script for HOME ? addShowAtHomeButton() : false and replacing that whole thing with false.

  • another minor bug, I'll often get logged out if coming into my home instance from an external one

    • My script has nothing to do with logging in or out of Lemmy itself. So if you actually get logged out of Lemmy itself, that is an issue to take up with your instance admins. Or do you mean that you get a message that you need to visit your home instance to update the authentication?

31 comments