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
    arrow-up
    4
    ·
    edit-2
    2 years ago

    I installed it on Firefox with Greasemonkey. I don’t get the dialog asking if I want to set my instance to my home instance, and I have no button in my settings. So, at the moment, the script appears to be inoperative.

    Edit: Tried a few more things. I visited several other instances, other than my home instance of lemmy.ca, and still don’t get any dialog about setting an instance to my home instance. Greasemonkey shows the script as enabled, but that’s it. I’m running Firefox 114.0.2 on Arch Linux.

    Edit2: Attempted to post an issue at the referenced Gitlab page, but this page does not exist, and a search for this project was a dead end. I have disabled the script until/unless the authors provide more information as to what is going on.

    Edit3: Found the Gitlab project. The provided URL on the Greasyfork page is incorrect. It should be https://gitlab.com/foundry-azzurite/lemmy-rewrite-links

    I will leave an issue.

    • Azzu@feddit.deOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      2 years ago

      Need to get a bit of feedback from you.

      Any errors in the browser console (F12 by default)? So go to lemmy.ca, press F12, make sure the console is open, refresh, look for red error messages. If there are, copy them to me.

      • Zamboniman
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        Yes. The following error appears:

        Script error in [Greasemonkey script http://azzurite.tv//Lemmy - Rewrite Links to Home Instance; version 1.0.0]: ReferenceError: GM_getValue is not defined

            • Azzu@feddit.deOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              2 years ago

              Alrighty, try updating, I’ve released a new version.

              • Zamboniman
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                2 years ago

                Got the ‘home instance’ dialog this time. Briefly checked it out, some of the links seem to be now directed towards my home instance, but there are no icons beside any link to show the original link as indicated in the description above.

                Edit: Noticed the following error in the console:

                Source map error: Error: URL constructor: tippy-bundle.umd.min.js.map is not a valid URL. Resource URL: user-script:http%3A//azzurite.tv//Lemmy%20-%20Rewrite%20Links%20to%20Home%20Instance Source Map URL: tippy-bundle.umd.min.js.map

                • Azzu@feddit.deOP
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  edit-2
                  2 years ago

                  That error’s irrelevant. Can you check that you have version 1.0.2 not 1.0.1?

                  • Zamboniman
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    2 years ago

                    I have 1.0.1. An attempted update shows ‘No newer update available.’

                  • Zamboniman
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    2 years ago

                    Ah, yes. It’s 1.0.1. Let me upgrade once again.