From 0c03253c9a18e0a41b6a32fc8d901930b18bc87c Mon Sep 17 00:00:00 2001 From: Michael Mainguy Date: Tue, 25 Nov 2025 19:00:18 -0600 Subject: [PATCH] Add "Play on Quest" button to header for non-Quest browsers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shows a button that uses Meta's Web Launch to send the current URL to the user's Quest headset. Hidden when already browsing on Quest. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/components/layouts/AppHeader.svelte | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/layouts/AppHeader.svelte b/src/components/layouts/AppHeader.svelte index 4bd8d74..9a4d6a0 100644 --- a/src/components/layouts/AppHeader.svelte +++ b/src/components/layouts/AppHeader.svelte @@ -7,6 +7,15 @@ // Show header when not in game $: visible = true; // We'll control visibility via parent component if needed + + // Detect if running in Quest browser (don't show "Play on Quest" button if already on Quest) + const isQuestBrowser = typeof navigator !== 'undefined' + && /OculusBrowser/i.test(navigator.userAgent); + + // Generate Meta Web Launch URL to send current page to Quest headset + $: webLaunchUrl = typeof window !== 'undefined' + ? `https://www.oculus.com/open_url/?url=${encodeURIComponent(window.location.href)}` + : ''; {#if visible} @@ -16,6 +25,11 @@

Space Combat VR