From 49e4d279c560c5204d6f0fb961e899a0a314a81f Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 3 Jun 2026 10:27:30 -0700
Subject: fix incorrect api url used in scoreToEmoji

---
 src/components/Result/index.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/components/Result/index.tsx')

diff --git a/src/components/Result/index.tsx b/src/components/Result/index.tsx
index 706ddca..19f9386 100644
--- a/src/components/Result/index.tsx
+++ b/src/components/Result/index.tsx
@@ -63,14 +63,14 @@ function ShareButton({ guesses, variant }: ShareButtonProps) {
     const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];
     const onWindows =
       windowsPlatforms.indexOf(window.navigator.platform) !== -1;
-
+    const isSecureContext = window.isSecureContext;
     if (navigator.share !== undefined && !onWindows) {
       await navigator.share({ text: result });
-    } else if (navigator.clipboard !== undefined) {
+    } else if (isSecureContext && navigator.clipboard !== undefined) {
       await navigator.clipboard.writeText(result);
       setButtonText('Copied!');
     } else {
-      setButtonText('Failed to open share menu or copy');
+      setButtonText('Clipboard unavailable (requires secure context)');
     }
   }, [result]);
 
-- 
cgit v1.2.3

