すべてのタブをブックマークする時もツリー構造を保持するように
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4829 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
44fb731dc0
commit
6826bd31e3
@ -79,4 +79,32 @@ window.addEventListener('load', function() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
eval('PlacesCommandHook.bookmarkCurrentPages = '+
|
||||||
|
PlacesCommandHook.bookmarkCurrentPages.toSource().replace(
|
||||||
|
'{',
|
||||||
|
<![CDATA[$&
|
||||||
|
TreeStyleTabService.beginAddBookmarksFromTabs((function() {
|
||||||
|
var tabs = [];
|
||||||
|
var seen = {};
|
||||||
|
Array.slice(getBrowser().mTabContainer.childNodes).forEach(function(aTab) {
|
||||||
|
let uri = aTab.linkedBrowser.currentURI.spec;
|
||||||
|
if (uri in seen) return;
|
||||||
|
seen[uri] = true;
|
||||||
|
tabs.push(aTab);
|
||||||
|
});
|
||||||
|
return tabs;
|
||||||
|
})());
|
||||||
|
try {
|
||||||
|
]]>
|
||||||
|
).replace(
|
||||||
|
/(\}\)?)$/,
|
||||||
|
<![CDATA[
|
||||||
|
}
|
||||||
|
catch(e) {
|
||||||
|
}
|
||||||
|
TreeStyleTabService.endAddBookmarksFromTabs();
|
||||||
|
$1]]>
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
}, false);
|
}, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user