From f416e5cf9ee2c0c7e8a833f21da91b5615495cd6 Mon Sep 17 00:00:00 2001 From: mst Date: Tue, 26 Nov 2024 15:06:50 +0300 Subject: [PATCH] tons of new and fixed js logic --- templates/index.html | 51 +++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/templates/index.html b/templates/index.html index 079fddd..6784d3e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -42,7 +42,9 @@ shareBtns.forEach((shareBtn) => { shareBtn.addEventListener("click", async () => { try { - await navigator.share(shareData); + if (navigator.canShare(shareData)) { + await navigator.share(shareData); + } } catch (err) { console.error(err); @@ -52,6 +54,30 @@ }; -