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
  • Tyler Wolf
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    i just want to say thanks for making this a greasemonkey userscript and not a browser extension, now qutebrowser can come in clutch 🙏

  • bdonvr@thelemmy.club
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    Excellent!

    No offense though but I hope this plugin doesn’t exist for long and it becomes a native feature. They already fixed community links though that’s a less involved process

    • Azzu@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      It can’t be a native feature since your browser doesn’t let websites you visit know about each other. One website does not know that you visited the other. It needs to be a userscript/browser addon which can save state independently. But of course there’s nothing stopping Lemmy to make an official browser addon.

      • bdonvr@thelemmy.club
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        Ah, well I meant when being linked from within Lemmy. But I suppose this extension would still be useful for being linked to Lemmy content from elsewhere

        • Azzu@lemm.eeOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 years ago

          Yes I meant this script to be mainly for sharing links or searching the web, once Lemmy posts get nicely indexed. Inside Lemmy I’m sure it’s eventually incorporated.