4 ms·
I've added a button that just triggers `navigator.share()`[1]. I know most users do the copy-paste dance, but I find this is a good middle ground. Adding functi
by ndegruchy 4mo ago
I've added a button that just triggers `navigator.share()`[1]. I know most users do the copy-paste dance, but I find this is a good middle ground. Adding functionality for my users, but not adding special social media share buttons.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share https://developer.mozilla.org/en-US/docs/Web/API/Navigator/s...
- input_sh 4mo agoI thought about using navigator.share myself, but decided to go with the basic "Copy URL" button instead, as navigator.share is pretty useless on desktops and not supported across browsers on phones either (Android's Webview being the big one for my use case).
- rickstanley 4mo agoWhy not both? A small button with "Copy link" text to, well, copy the current URL and another that calls "native" share, if available. I don't find it to be too many options, but I would guess that perhaps "Copy link" would have more clicks than `navigator.share`.
- imoverclocked 4mo agoYou could switch between them depending on the browser. Desktop users are more likely to want an URL anyway, IMHO. FWIW: iOS has a "copy" option in the share popup.
- siriusfeynman 4mo agoOh is this what that is, I saw a few sites use it recently but for whatever reason on my desktop pc (windows 10) the only options I have are copilot, another copilot (for some reason), one-note and discord, which claims to also be a copy to clipboard option but it doesn't work. So in the end for sites that don't show the raw string I have no way to copy something.
- yieldcrv 4mo agonavigator.share is limited and the share intent breaks UX, adding more clicks to a funnel than I want I leave it as an option for the users that really want it though, but surface other things like just the copy icon to put something directly on the clipboard the articles best stats are from 2012, I’m sorry to inform that was 14 years ago, people are even more acclimated to direct linking
- OptionOfT 4mo agoI wish Apple would mandate this in their apps. Many apps open their own share-sheet and you need to tap another button to open the native one.