From 1fa31f2181e0001411c4e61afad699ff6bec984c Mon Sep 17 00:00:00 2001 From: Alexandre LACOUR <100684188+Akalabete@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:27:11 +0200 Subject: [PATCH] add a btn that copy url to clipboard --- Projects/Bookmarker_App/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Projects/Bookmarker_App/main.js b/Projects/Bookmarker_App/main.js index d683b4f9e..0b0fefcbb 100644 --- a/Projects/Bookmarker_App/main.js +++ b/Projects/Bookmarker_App/main.js @@ -56,6 +56,7 @@ function fetchbookmarks() {
${bookmarks[i].name}
+ Visit Delete
@@ -64,7 +65,12 @@ function fetchbookmarks() { `; } } - +// Copy selected site's URL to clipboard +function copyToClipBoard(url) { + navigator.clipboard.writeText(url); + // Alert the copied text + alert("URL Copied"); +} // Validate Form function validateform(sitename, siteurl) { if (!sitename || !siteurl) {