mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 13:49:59 +02:00
Refactor ZenWorkspaces.mjs to add createContainerTabMenu method
This commit is contained in:
parent
89f28b307d
commit
4cedd84ac8
1 changed files with 14 additions and 0 deletions
|
@ -683,6 +683,20 @@ var ZenWorkspaces = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Tab browser utilities
|
// Tab browser utilities
|
||||||
|
createContainerTabMenu(event) {
|
||||||
|
let window = event.target.ownerGlobal;
|
||||||
|
const workspace = this.getActiveWorkspaceFromCache();
|
||||||
|
if (!workspace) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let containerTabId = workspace.containerTabId;
|
||||||
|
return window.createUserContextMenu(event, {
|
||||||
|
isContextMenu: true,
|
||||||
|
excludeUserContextId: containerTabId,
|
||||||
|
showDefaultTab: true,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
getContextIdIfNeeded(userContextId) {
|
getContextIdIfNeeded(userContextId) {
|
||||||
if (typeof userContextId !== "undefined" || !this.workspaceEnabled) {
|
if (typeof userContextId !== "undefined" || !this.workspaceEnabled) {
|
||||||
return [userContextId, false];
|
return [userContextId, false];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue