Closed jamesbraza closed 10 months ago
Hi @jamesbraza, I was unable to understand your question completely. Could you please describe a workflow. Please make a mockup or a drawing for me to understand properly
As I can see, long pressing icon of the share links (on chrome mobile) opens context menu to copy link.
OR, are you asking about integration with browser's Clipboard API and copying the URL to system/browser clipboard?
Yeah sorry for being unclear, let me elaborate 👌
long pressing icon of the share links (on chrome mobile) opens context menu to copy link.
My thinking here is, this is a possible route on mobile, but not necessarily on computers. Also, fwiw one has to know to long-press on the title.
I find an explicit "copy link" icon as part of the share modal, something like this (in blue box):
Though it doesn't need to actually have the text "copy link". Another possible route I found here from JIRA:
And another, this one is from Google Drive:
Does that clarify what I am looking for? One of these copy link icons in the share socials modal
Yeah, that can be done. I will try to hook into browsers' Share API (which will bring up share page like your first image) for mobile and Clipboard API (to simply copy the link) for desktops.
There will be checks nonetheless if browsers supports the API.
Let me know if you are on board with this.
Yeah I like what you're thinking with outsourcing to browser. For me, I am primarily a desktop user.
Thanks for being open to this! 👍
Sure, its a few lines of JS. Changes will be there shortly
Added Share link. If you want to change order, you may extend the partial.
It first checks if browser supports Webshare API, if yes, it will ask Browser/OS to open Share Link Else it invokes Clipboard API to copy the URL (Clipboard cannot copy much BTW). If everything fails, you will get Console output.
Closing this issue
Gave it a try just now, and it worked!! Yaayy!
Nice job @1bl4z3r 👍
Here is what my current share menu looks like (as of https://github.com/1bl4z3r/hermit-V2/commit/3eabdaf2b46a01d2abe0e137919c2f9c825a8f43), and it looks great. 🥳
For many share features on other website, a sharing option is supported that copies the page's hyperlink to the clipboard. On Google Chrome's mobile app, this sharing option is called "Copy link".
My request here: add a share option for just copying the page's link to the clipboard