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 "Share" button [sic] #63

Closed kytta closed 1 year ago

kytta commented 1 year ago

On supported devices (which includes mobile browsers, Chromium and Edge on Windows, and Safari), there is the Web Share API. In particular, navigator.share() allows for showing a share popup of the OS, allowing to share the link to other apps we might not support: SMS messengers, Mastodon clients, etc. One can use navigator.canShare() to hide the button on unsupported devices.