Closed ToogleLiu closed 1 year ago
Thank you for developing this project, it helped me a lot.
Thank you for your kind words!
Have you considered adding the function of copying link?
I actually didn't! I considered something similar, that being the Share API that would open the share sheet on mobile devices. This sheet offers the "Copy link" functionality, but it isn't very present on the desktop yet. "Copy URL" would be an excellent addition!
Can you share more info about the Copy URL button? Where do you want it?
Can you share more info about the Copy URL button? Where do you want it?
Well, I'd want to have a button, similar to how there already are buttons for social networks. It should have a neutral background (dark grey, I guess), a generic "link" icon (for example: ), and by clicking it, the page url (location.href
) should be copied to the clipboard
Can you share more info about the Copy URL button? Where do you want it?
Well, I'd want to have a button, similar to how there already are buttons for social networks. It should have a neutral background (dark grey, I guess), a generic "link" icon (for example: ), and by clicking it, the page url (
location.href
) should be copied to the clipboard
Yes, what you describe is exactly what I want.
So you want to add new button, next to the social networks button? This button will copies the current page url location.href
to the clipboard?
So you want to add new button, next to the social networks button? This button will copies the current page url
location.href
to the clipboard?
Yes. Like this:
Just like the one on the https://medium.com/ website.
Thanks for sharing! I have been looking through the code and it has been quite confusing for me. Can you share the files where I have to edit to add in this copy link button? Is it in index.html
?
Thanks for sharing! I have been looking through the code and it has been quite confusing for me. Can you share the files where I have to edit to add in this copy link button? Is it in
index.html
?
Are you planning to add the Copy URL button in this open source project? Your question may require the author of this open source project to answer.
I think that explaining the code will take me more time than actually implementing the feature. I'll take a look at it today :)
To-do list for this issue:
shareon.js
— adding to the URL map won't work since it's not a URLshareon.css
— add new style and icon. Colour should be something like #222222
, see above for the iconindex.html
— it's a testing page that doesn't get published anywhere, but I need it to test my buttons manuallyWill release this shortly!
🚀 Released in v2.1.0! See it in action: https://shareon.js.org/
Great! Thanks.
Thank you for developing this project, it helped me a lot. Have you considered adding the function of copying link?