Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(chrome-extension): use popup-window for standalone panel fallback

Richie McIlroyc260b692ecd0
diff --git a/apps/chrome-extension/src/background/service-worker.ts b/apps/chrome-extension/src/background/service-worker.ts
index 031e6e969..2e811d99a 100644
--- a/apps/chrome-extension/src/background/service-worker.ts
+++ b/apps/chrome-extension/src/background/service-worker.ts
@@ -57,7 +57,12 @@ import type {
ServiceWorkerResponse,
} from "../shared/types";
-const POPUP_URL = "popup.html";
+// popup.html is web-accessible with use_dynamic_url so sites cannot fingerprint
+// the extension via the overlay iframe's static URL; that same flag makes its
+// static chrome-extension:// URL fail with ERR_BLOCKED_BY_CLIENT when opened as
+// a window. The standalone fallback therefore loads a privileged twin that is
+// not in web_accessible_resources.
+const POPUP_URL = "popup-window.html";
const OFFSCREEN_URL = "offscreen.html";
const AUTH_TIMEOUT_MS = 10 * 60 * 1000;
const OFFSCREEN_MESSAGE_ATTEMPTS = 3;