diff --git a/index.js b/index.js index 357fc1c..e338aff 100644 --- a/index.js +++ b/index.js @@ -905,6 +905,7 @@ ContainerWindow.prototype = { this._configurePlusButtonMenu(), this._configureActiveTab(), this._configureFileMenu(), + this._configureAllTabsMenu(), this._configureContextMenu(), this._configureTabStyle(), ]); @@ -1036,6 +1037,16 @@ ContainerWindow.prototype = { }); }, + _configureAllTabsMenu() { + return this._configureMenu("alltabs_containersTab", null, e => { + const userContextId = parseInt(e.target.getAttribute("data-usercontextid"), 10); + ContainerService.openTab({ + userContextId: userContextId, + source: "alltabs-menu" + }); + }); + }, + _configureContextMenu() { return this._configureMenu("context-openlinkinusercontext-menu", () => { @@ -1054,7 +1065,6 @@ ContainerWindow.prototype = { // Generic menu configuration. _configureMenu(menuId, excludedContainerCb, clickCb) { const menu = this._window.document.getElementById(menuId); - this._disableElement(menu); if (!this._disableElement(menu)) { // Delete stale menu that isn't native elements while (menu.firstChild) { @@ -1148,6 +1158,7 @@ ContainerWindow.prototype = { this._shutdownPlusButtonMenu(); this._shutdownFileMenu(); + this._shutdownAllTabsMenu(); this._shutdownContextMenu(); }, @@ -1169,6 +1180,10 @@ ContainerWindow.prototype = { this._shutdownMenu("menu_newUserContext"); }, + _shutdownAllTabsMenu() { + this._shutdownMenu("alltabs_containersTab"); + }, + _shutdownContextMenu() { this._shutdownMenu("context-openlinkinusercontext-menu"); },