Skip to content

Support auto-redirection by <link rel=alternate type=application/activitypub+json>? #105

@saschanaz

Description

@saschanaz

Background

It seems the redirection happens only when the interaction popup opens, but what if opening a remote instance can automatically redirect to the home instance, with more generic method than being too implementation-specific?

(I saw you showed some interest in raikasdev/mastodon4-redirect#6 which also does the auto redirection)

Proposed solution

Mastodon and Misskey inject <link rel=alternative type=application/activitypub+json href=(object id)> to the page, that way one can know the page can be loaded as an ActivityPub object. Since Mastodon has an API to resolve such object id, the extension can call the API to get a home instance URL and do the redirect.

Here is a proof of concept written as a userscript: https://gist.github.com/saschanaz/701908eb329af5991061f8813b5bf4bc

Alternatives

Additional context

(This may replace #104 and the existing Mastodon matcher)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions