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} - +