I wanted to check if [navigator.share](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share) works. This PR adds a hidden button for native share and unhides it if native share is available. On desktops it may not be available but it worked for me in Chrome on an Android phone.[^1]
I'm not sure if it's very useful because you can just share the current page url from the browser menu.  [^1]: The server needs to run either on https or localhost, so you'll likely need to enable port forwarding on chrome://inspect/#devices to test this locally. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5882 -- Commit Summary -- * Add focus ring to share buttons * Replace .ssb-icon with [data-share-type] * Add hidden share button * Enable share button to do native share -- File Changes -- A app/assets/images/social_icons/share.svg (3) M app/assets/javascripts/social_share_button.js (18) M app/helpers/social_share_button_helper.rb (25) M config/locales/en.yml (3) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/5882.patch https://github.com/openstreetmap/openstreetmap-website/pull/5882.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5882 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev