The demo table doesn't include all available services that are supported by
Farside, and likely shouldn't anyways since it already clutters up the readme a
bit. The existing demos should give a good enough idea of how Farside works and
how to use it.
Bibliogram links require a "/u/" prefix when viewing a user's profile,
which does not match Instagram's URL paradigm. This adds a bit of logic
for Bibliogram links to prepend this prefix if the user is not visiting
a post (indicated by a "/p/" prefix, which Bibliogram and Instagram BOTH
use) or the home page of an instance (indicated by an empty path value).
Farside was previously only looking for links containing "youtube.com"
when performing the redirect for full URLs to youtube, which obviously
doesn't work for youtu.be shortened links. This updates the matching
logic to use a regex element for every key in the services map in order
to match against multiple possible domains for each parent service.
Fixes#40
Wikiless updated their instance json with a couple of changes that broke
Farside's auto update workflow:
- The protocol for each instance is now included by default (no need to prepend
"https://")
- The instances are differentiated between regular, onion, and i2p (no need to
check for ".onion" in regular instance URLs)
Query params were not included when using the "/_/" prefix for farside
links. This extracts the logic for parsing query params into a function
that is then used for both /_/ and non-/_/ links.
Farside now supports redirecting based on a provided link to a "parent"
service, if such a parent service is supported.
For example, a link such as:
farside.link/https://www.youtube.com/watch?v=dQw4w9WgXcQ
will now redirect to any of the available YouTube related frontends.
This works by matching against a mapping of "parent" service domains
("youtube.com", "reddit.com", etc) to a list of their respective frontend
alternatives (["invidious", "piped"], ["libreddit", "teddit"], etc). A
random element is chosen from this list, and the remainder of Farside's
routing logic proceeds as if the user had chosen the service directly to
begin with.
Closes#37