Mastodon Post Embed Shortcut

Updated 07272022-071810


Social

Mastodon embeds are finally resizing correctly on their own! so I finally got around to posting a (very simple) Siri Shortcut for constructing standard HTML Mastodon post embed code. https://routinehub.co/shortcut/12647/

Mastodon embeds are finally resizing correctly on their own! so I finally got around to posting a (very simple) Siri Shortcut for constructing standard HTML Mastodon post embed code. https://t.co/InudSKlhFJ pic.twitter.com/E3lwvYLxRA

— ⓓⓐⓥⓘⓓ ⓑⓛⓤⓔ (@NeoYokel) July 27, 2022

Mastodon Post Embed
Mastodon Post Embed

Construct HTML embed code for a single Mastodon post from its URL.

This shortcut receives the URL for a single Mastodon post (ex: https://mastodon.social/@DavidBlue/108719072749537994) and constructs standard format HTML embed code (precisely the same output you'll get from using the "Embed" button in Tootsuite,) which it then outputs directly with a Stop and Output action so that (in theory,) one can use it to replace selected URLs immediately from the share sheet.

Example output:

<iframe src="https://mastodon.social/@DavidBlue/108719072749537994/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://static-cdn.mastodon.social/embed.js" async="async"></script>
``