From 9d0012edadb26e163d6aeb9db4cca0e63488430b Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 3 Apr 2026 23:05:54 +0200 Subject: [PATCH] fix(takeover): navigate uses full URL, viewport returns url not hash Co-Authored-By: Claude Sonnet 4.6 --- src/composables/useTakeover.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/composables/useTakeover.ts b/src/composables/useTakeover.ts index 46fd860..cbc242a 100644 --- a/src/composables/useTakeover.ts +++ b/src/composables/useTakeover.ts @@ -92,12 +92,12 @@ export function useTakeover(wsSend: (msg: any) => void) { } function viewport() { - return { w: window.innerWidth, h: window.innerHeight, dpr: window.devicePixelRatio, hash: window.location.hash }; + return { w: window.innerWidth, h: window.innerHeight, dpr: window.devicePixelRatio, url: window.location.href }; } - function navigate(args: { hash: string }) { - window.location.hash = args.hash; - return { navigated: args.hash }; + function navigate(args: { url: string }) { + window.location.href = args.url; + return { navigated: args.url }; } function reload() { @@ -280,6 +280,8 @@ export function useTakeover(wsSend: (msg: any) => void) { return; } + // ext_* commands are handled by the Chrome extension — ignore silently + if (cmd.startsWith('ext_')) return; sendResult({ type: 'dev_cmd_result', cmdId, error: `Unknown command: ${cmd}` }); }