From ca0e6030d55199cfe940f9f02a0aaa87d4fa5b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristijan=20Ribari=C4=87?= Date: Sun, 13 Oct 2024 22:41:37 +0200 Subject: [PATCH] This commit introduces a new parameter `allowInheritPrincipal` to the `getContextIdIfNeeded` function in `ZenWorkspaces.mjs`. This allows recognition of opening bookmarks in new tab so that they can be opened in a default container. --- src/ZenWorkspaces.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ZenWorkspaces.mjs b/src/ZenWorkspaces.mjs index 38ab97d..3989481 100644 --- a/src/ZenWorkspaces.mjs +++ b/src/ZenWorkspaces.mjs @@ -874,7 +874,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { }); } - getContextIdIfNeeded(userContextId, fromExternal) { + getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal) { if(!this.workspaceEnabled) { return [userContextId, false]; } @@ -882,7 +882,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { const activeWorkspace = this.getActiveWorkspaceFromCache(); const activeWorkspaceUserContextId = activeWorkspace?.containerTabId; - if(fromExternal && !!activeWorkspaceUserContextId) { + if((fromExternal || allowInheritPrincipal === false) && !!activeWorkspaceUserContextId) { return [activeWorkspaceUserContextId, true]; }