Commit graph

4 commits

Author SHA1 Message Date
Ben Busby 5006b97dfa
Auto select frontend for links to "parent" service
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
2022-06-09 13:08:01 -06:00
Ben Busby 932f3bbcab
Preserve redirect with /_/ path prefix (#13)
This adds a straightforward way of preserving Farside's redirecting
behavior in the user's browser history. That way if an instance becomes
unavailable between the 5 min scans, the user can opt to navigate back
one page and be taken to a new instance.

This is accomplished using a single line of JS, and could potentially
work as the default behavior of Farside (with the current default
behavior requiring a path prefix instead). This should be revisited down
the road when more people are using this service.
2022-01-27 11:57:41 -07:00
Ben Busby edcab37c7d
Write results of update script to file for debugging
The update script now writes the available instances to a
.update-results* file (where previous runs have "-prev" appended to the
file name). This helps to see how instance availability changes between
runs of the script when debugging overall functionality of the app.
2021-10-22 18:07:59 -06:00
Ben Busby be9606094c
Initial commit 2021-10-21 15:50:04 -06:00