autinerd / simple-mastodon-follow-button

Provides a simple Mastodon follow button.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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="@autinerd@chaos.social"></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="@autinerd@chaos.social"></button>

Important

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

Demo

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

About

Provides a simple Mastodon follow button.

License:Apache License 2.0


Languages

Language:JavaScript 65.0%Language:HTML 24.2%Language:CSS 10.7%