From 8e82038dbbca39b6ddcdcd757dc99932c36c17ee Mon Sep 17 00:00:00 2001 From: satr14 Date: Sat, 18 Jul 2026 22:03:12 +0700 Subject: [PATCH] click to copy --- src/routes/+page.svelte | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 83357a7..94d735b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -21,6 +21,14 @@ let audio: HTMLAudioElement; let showNotification = $state(false); + let showCopyNotification = $state(false); + + function copyCurlCommand() { + navigator.clipboard.writeText("curl https://satr14.my.id").then(() => { + showCopyNotification = true; + setTimeout(() => showCopyNotification = false, 3000); + }).catch(() => {}); + } function playAudio() { if (audio.paused) { @@ -61,6 +69,14 @@ {/if} +{#if showCopyNotification} +
+
+

Copied to clipboard

+
+
+{/if} +
@@ -117,7 +133,7 @@ {/each} - +