From 806c2a7c0f678f4737d59dbdfaf6f61daa3ba4c4 Mon Sep 17 00:00:00 2001 From: JustOff Date: Tue, 25 Dec 2018 15:23:42 +0200 Subject: [PATCH 1/2] Restore tree when using Tab Kit 2 --- bootstrap.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bootstrap.js b/bootstrap.js index b0bdd73..24f314c 100644 --- a/bootstrap.js +++ b/bootstrap.js @@ -560,6 +560,19 @@ LullTheTabs.prototype = { }); } + // Restore tree when using Tab Kit 2 + if (this.browserWindow.tabkit && this.browserWindow.tabkit.api) { + let tk2api = this.browserWindow.tabkit.api; + let parent = tk2api.getParentTab(aTab); + if (parent) { + tk2api.addChildTabs(parent, [newtab]); + } + let children = tk2api.getChildTabs(aTab); + if (children && children.length) { + tk2api.addChildTabs(newtab, children); + } + } + // If we are in the full reload mode, select the new tab. if (aOptions && aOptions.force && aOptions.reload) { tabbrowser.selectedTab = newtab; From 741aa51e490070022eecc76cbe2865fae75ac72b Mon Sep 17 00:00:00 2001 From: JustOff Date: Wed, 26 Dec 2018 16:43:39 +0200 Subject: [PATCH 2/2] Reset tab to be removed when restoring Tab Kit 2 trees --- bootstrap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap.js b/bootstrap.js index 24f314c..af31a5e 100644 --- a/bootstrap.js +++ b/bootstrap.js @@ -571,6 +571,7 @@ LullTheTabs.prototype = { if (children && children.length) { tk2api.addChildTabs(newtab, children); } + tk2api.resetTab(aTab); } // If we are in the full reload mode, select the new tab.