From b6df61d2875fff916ce43e5d96d94fccf989798a Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Mon, 12 Jan 2026 12:20:44 +0100 Subject: [PATCH] fixes for safari extension (#26741) Co-authored-by: CarinaWolli --- companion/extension/entrypoints/background/index.ts | 3 ++- companion/wxt.config.ts | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/companion/extension/entrypoints/background/index.ts b/companion/extension/entrypoints/background/index.ts index 0b863d0f72..d48cf40b19 100644 --- a/companion/extension/entrypoints/background/index.ts +++ b/companion/extension/entrypoints/background/index.ts @@ -277,7 +277,8 @@ function getTabsAPI(): typeof chrome.tabs | null { // Get action API with cross-browser support function getActionAPI(): typeof chrome.action | null { const api = getBrowserAPI(); - return api?.action || null; + // Safari uses browserAction (Manifest V2), Chrome uses action (Manifest V3) + return api?.action || (api as any)?.browserAction || null; } // Check if the URL is a restricted page where content scripts can't run diff --git a/companion/wxt.config.ts b/companion/wxt.config.ts index a79b13b472..5bd7a4eabb 100644 --- a/companion/wxt.config.ts +++ b/companion/wxt.config.ts @@ -59,7 +59,12 @@ export default defineConfig({ name: "Cal.com Companion", version: "1.7.5", description: "Your calendar companion for quick booking and scheduling", - permissions: ["activeTab", "storage", "identity"], + permissions: [ + "activeTab", + "storage", + // Safari doesn't support Chrome's identity API + ...(browserTarget !== "safari" ? ["identity"] : []), + ], host_permissions: [ "https://companion.cal.com/*", "https://api.cal.com/*",