This script transforms links from other instances to your home instance. So useful :)

As @MedicareForSome@lemmy.ml explained:

It makes it so that if you visit another instance using their URL, it will redirect you to your home version’s federated link.

E.g. if your home server is Lemmy.world, let’s say you find a link to Lemmy on another website but it’s a link to Lemmy.ml. If you click the link, you won’t be signed in.

So like:

https://lemmy.ml/c/memes would redirect to https://lemmy.world/c/memes@lemmy.ml

This way you can seamlessly use Lemmy.

It does the same for posts.

Edit: since it works from any site, I highly recommend you to add it to your Android browser so it will work with webapp clients here’s how:

You can use violentMonkey on ff browser too, but you need to unlock Dev options, then do this

  • Azzu@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 year ago

    Author here, any questions or issues can be directed to me :)

    And yes, I’m doing it for the luls

          • Azzu@lemm.ee
            link
            fedilink
            arrow-up
            0
            ·
            1 year ago

            I see. I think there are already efforts towards that. This is mainly supposed to be for the browser and not my domain.

            And honestly, I don’t really get why you’d need an app if the official web UI works perfectly well on a mobile browser :)

            • LoudWaterHombre@lemmy.dbzer0.com
              link
              fedilink
              arrow-up
              0
              ·
              1 year ago
              • Better push notifications
              • smaller scope for browser storage permission
              • smoother (and more) animations
              • better multi account support

              I think there are even more reasons.

              This is mainly supposed to be for the browser and not my domain.

              What do you mean? I wanted it in an app, not domain spicific.

              • Azzu@lemm.ee
                link
                fedilink
                arrow-up
                0
                ·
                1 year ago

                You’re in a thread about me answering questions for a browser extension, asking about a mobile app. I think it’s more appropriate to ask: what do you mean? I have nothing to do with a mobile app.

                • LoudWaterHombre@lemmy.dbzer0.com
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  1 year ago

                  But its obviously a great functionality. We could think of setting it up as a proper library with good interfaces so you could just pull it into your code.

                  In the end we are making open source software to improve the platform, so you could also submit your algorithm to the projects.

                  I’m sorry I thought this thread is about asking questions and having a discussion about the feature and your code

    • icesentry@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      How does it detect that a link is a lemmy link? Also, does this work on any website or just lemmy? Can it also handle things like opening a link from an app outside of the browser?

      • Azzu@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        1 year ago

        You should look at the link this post points to, the description of the script answers 2/3 :D

        1. A link is detected by keeping a list of all instances and just matching them to that list. Currently contains 1188 instances sourced from https://lemmyverse.net/
        2. Yes, any website
        3. Yes, not immediately, but you get a “Show on [HOME INSTANCE]” link at the top