Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 783 Bytes

README.md

File metadata and controls

34 lines (21 loc) · 783 Bytes

A simple Mastodon follow button

Usage

Add those two lines to your HTML header:

<link rel="stylesheet" href="mastodonFollow.css">
<script src="mastodonFollow.js"></script>

Remote follow

Add a button which opens the Mastodon remote follow page:

<button class="mastodon-follow" data-followtype="remote" data-account="@[email protected]"></button>

Direct follow

Add a button which asks for the home instance of the user and then allows them to directly follow you:

<button class="mastodon-follow" data-followtype="direct" data-account="@[email protected]"></button>

Important

The account has to be in the format "@username@instance"

Demo

Simple demo: https://autinerd.github.io/simple-mastodon-follow-button/