YSK: you should use this lemmy link switcher script (via violentMonkey)

XpeeN@sopuli.xyz to You Should Know@lemmy.world – 176 points –
Lemmy Universal Link Switcher
greasyfork.org

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

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

55

You are viewing a single comment

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?

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

How it find posts tho?

It basically just asks your home server.