From 1697d6dbbb103b2bfaec896036a9a5a3685508d7 Mon Sep 17 00:00:00 2001 From: eri451 <hans.orter@gmx.de> Date: Fri, 23 Mar 2012 20:31:56 +0100 Subject: [PATCH] made sesseionsave work with tabgroups --- penta-sessions.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/penta-sessions.js b/penta-sessions.js index 596c495..d8765de 100644 --- a/penta-sessions.js +++ b/penta-sessions.js @@ -96,14 +96,20 @@ group.commands.add(['sessions[ave]','mkses[sion]'], } if (/tabs/.test(sesop)) { - tabs.visibleTabs.forEach(function (tab, i) { - let loc = tab.linkedBrowser.contentDocument.location.href; - if (/^dactyl:\/\/help\//.test(loc) && !/help/.test(sesop)) - return; - if (loc == 'about:blank' && !/blank/.test(sesop)) - return; - lines.push('tabopen '+loc); - }); + tabs._groups.GroupItems.groupItems.forEach( function (group, k) { + lines.push('js let newGroup = tabs._groups.GroupItems.newGroup()'); + lines.push('js newGroup.setTitle('+group.getTitle()+')'); + lines.push('js tabs._groups.GroupItems.setActiveGroupItem(newGroup)'); + + group._children.forEach(function (tab, i) { + let loc = tab.tab.linkedBrowser.contentDocument.location.href; + if (/^dactyl:\/\/help\//.test(loc) && !/help/.test(sesop)) + return; + if (loc == 'about:blank' && !/blank/.test(sesop)) + return; + lines.push('tabopen '+loc); + }); + }); } try { -- GitLab