Skip Navigation

[Cross-Post lemmy.world] - Lemmy Universal Link Switcher rewrites all links to Lemmy instances everywhere to your home instance! Now rewrites post/comment links! 1.2.0 Release!

greasyfork.org Lemmy Universal Link Switcher

Ensures that all URLs to Lemmy instances always point to your main/home instance.

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

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.

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 <em>communities</em> or <em>users</em> 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
2
2 comments
  • Hi, I suspect i should very much appreciate your hard work on this. Thank you!

    But... why do I need this and what does it do exactly, and why?

    Sorry for my ignorance, but I'm probably not the only one....

    • Oh, you shouldn't feel indebted to me. This entire "The Andromedus Galacticus Collection" community (in reddit terms "subreddit") is just a bunch of links that I post here when I find them interesting. I almost never have any personal involvement in any of the posts.

      That being said, let me see if I can offer some insight. If I'm understanding the use case from the original post correctly, when you're on your lemmy website (for you "lemm.ee") and someone else posts a link to a post that leads to "lemmy.world", it can be annoying, because when you click on the link and it takes you to lemmy.world to see that post. Now you're at lemmy.world and you can't interact with the post, because you're no longer on lemm.ee, and you don't have a login at lemmy.world. This script aims to convert that original link that someone posted leading to lemmy.world, and convert it to the lemm.ee version so you can be logged in and enjoy all the functions of lemmy.

      I hope that clears it up a bit, again I just shared a link I found, you have no thanks due to me. The link in the post it the place that the author is keeping their contents.