ブックマークグループをサブツリーとして開く設定の時、

最後のタブが空だとサブツリーが正しく形成されない問題を修正

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1609 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2007-11-23 07:29:48 +00:00
parent 4f6ed3627f
commit a0a6d28878

View File

@ -986,10 +986,20 @@ catch(e) {
if ('BookmarksCommand' in window) { // Firefox 2 if ('BookmarksCommand' in window) { // Firefox 2
eval('BookmarksCommand.openGroupBookmark = '+ eval('BookmarksCommand.openGroupBookmark = '+
BookmarksCommand.openGroupBookmark.toSource().replace( BookmarksCommand.openGroupBookmark.toSource().replace(
/(tabPanels\[index\])(\.loadURI\(uri\);)/,
<><![CDATA[
$1$2
if (!doReplace &&
TreeStyleTabService.getTreePref('openGroupBookmarkAsTabSubTree') &&
!browser.treeStyleTab.parentTab) {
TreeStyleTabService.readyToOpenChildTab($1, true);
}
]]></>
).replace(
'browser.addTab(uri);', 'browser.addTab(uri);',
<><![CDATA[ <><![CDATA[
var openedTab = browser.addTab(uri); var openedTab = $&
if (!TreeStyleTabService.getPref('browser.tabs.loadFolderAndReplace') && if (!doReplace &&
TreeStyleTabService.getTreePref('openGroupBookmarkAsTabSubTree') && TreeStyleTabService.getTreePref('openGroupBookmarkAsTabSubTree') &&
!browser.treeStyleTab.parentTab) { !browser.treeStyleTab.parentTab) {
TreeStyleTabService.readyToOpenChildTab(openedTab, true); TreeStyleTabService.readyToOpenChildTab(openedTab, true);
@ -999,7 +1009,7 @@ catch(e) {
'if (index == index0)', 'if (index == index0)',
<><![CDATA[ <><![CDATA[
TreeStyleTabService.stopToOpenChildTab(browser); TreeStyleTabService.stopToOpenChildTab(browser);
if (index == index0)]]></> $&]]></>
) )
); );
} }