Robb Knight

Follow Mastodon User on Micro.blog Shortcut

2022-11-03

Micro.blog has support for following and replying to Mastodon users but getting from someone's profile on Mastodon to the follow page on Micro.blog can be a pain. To search for a user you need have it in the format of cooluser@mastodon.instance which isn't the same as the profile URLs. To make this easier I made a shortcut that does the following:

  1. Takes the current Safari URL, for example https://mastodon.instance/@cooluser
  2. Gets the domain (mastodon.instance) and the path (@cooluser)
  3. Swaps those round to become cooluser@mastodon.instance
  4. Opens the page on Micro.blog to be able to follow that user (https://micro.blog/cooluser@mastodon.instance)

It will also check to see if the path/username contains an @ symbol and if it doesn't will show an alert instead. This isn't ideal but given that Mastodon can have any domain, it's much harder to detect if it's a Mastodon site or not.

There is a meta tag in the HTML with profile:username as the property name but I don't know enough about Shortcuts to do this.

Download Follow Mastodon User on Micro.blog shortcut