A simple script to provide a "share on mastodon" button without any styles. To use it, add the script and put a link where you want to share to mastodon.
I've made all the things you want to show to the user editable in the link.
<a href="#" rel="noreferrer noopener"
target="mastodon"
data-prompt="Please tell me your Mastodon instance"
data-edittext="✏️"
data-editlabel="Edit your Mastodon instance"
class="mastodon-share">
Share to Mastodon
</a>
<script src="mastodon-share.js"></script>The first time users click the share button, it asks for their mastodon instance and stores it in local storage. Subsequently you can just click the link. Here's how that looks as a GIF recording:
You also get an edit link next to the share button to edit your instance in case you made a mistake.
