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.

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:
home

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!
settings

Features

  • Rewrite all links of communities or users 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.
    rewrite

  • 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.
    redirect

Coming soon

  • Post & comment links. Those are a bit harder because the URL has to be requested from the instances.

Repository & Issues

  • Zamboniman
    link
    fedilink
    English
    1
    edit-2
    1 year ago

    Wild idea, but could it just be that you’re using it wrong? :D if you’re on lemmy.ca then almost nothing should be rewritten because almost all links already go to lemmy.ca. Only when you go to another instance somehow or a user posts a link, for example this one then it should be rewritten.

    I did think of that! Sure wouldn’t be the first time I’ve done something like that, hehehe!! But no. For example, I’m on lemmy.ca, so I tried going to lemmy.ml and lemmy.world to see what the links looked like there. One of those I have a different account which I was logged in to, and the other I have no account so wasn’t signed in. Nothing.

    However, I’ve been trying a few things here, including disabling all my other extensions and scripts, which didn’t make any difference. So then I left every extension disabled, removed your script, removed the few other scripts I installed in violentmonkey, removed violentmonkey, reinstalled violentmonkey and your script…and it was working again once more. So, I figured some other script or extension was causing havoc, so I renabled the other extensions and reinstalled the other scripts one by one, checking each time. They’re all enabled again. Still working. I dunno… Obviously something really weird is happening on my end. Right now, it’s working, so I’ll let you know if it starts to act odd again. My thinking right now is some other extension or script was messing something up big time, and all the disabling and re-enabling sorted it out somehow.

    My working hypothesis right now: The issue wasn’t your script, it was something else on my system.

    Thanks for your help with this, btw!

      • Zamboniman
        link
        fedilink
        English
        11 year ago

        Me too. I went back and checked Chrome, and that was indeed my fault. I was being a doorknob, and so led myself astray, lol.

        Still working, so far! :)