aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Result
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-06-03 10:27:30 -0700
committerPinapelz <yukais@pinapelz.com>2026-06-03 10:27:30 -0700
commit49e4d279c560c5204d6f0fb961e899a0a314a81f (patch)
tree61b14d366357dbb5a0241d245e328ff2fbac48bc /src/components/Result
parentbb249f5733cf8cd7cb0f8a33fc9f962e76e1ec7d (diff)
fix incorrect api url used in scoreToEmoji
Diffstat (limited to 'src/components/Result')
-rw-r--r--src/components/Result/index.tsx6
1 files changed, 3 insertions, 3 deletions
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]);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage