kytta / shareon

📯 Lightweight, stylish, and ethical share buttons for popular social networks
https://shareon.js.org/
MIT License
465 stars 25 forks source link

Add a Mastodon button #23

Closed andybalaam closed 4 years ago

andybalaam commented 4 years ago

Hi, brilliant project!

I attempted to add a Mastodon share button. It's more complicated than the others because we need to ask which Mastodon instance you use, so we need to run JavaScript when you click the link.

I implemented asking which instance using a prompt() which looks basic but does work. I also included remembering your choice so it can be the default next time. All this was inspired by https://www.256kilobytes.com/content/show/4812/ .

Let me know what you think.

Thank you for shareon, it is really cool. I am using it at https://andybalaam.gitlab.io/smolpxl/spring/

kytta commented 4 years ago

Hi Andy, thank you for your contribution 🙇‍♂️ I'll try to review it as soon as I can :)

andybalaam commented 4 years ago

Closing in favour of #27 which does the same thing a better way.