ドラッグ中はツールチップを表示しないように
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@3937 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
d6dd971eaa
commit
94c1e11844
@ -142,11 +142,11 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('MultipleTabService.showHideMenuItems = '+
|
eval('MultipleTabService.showHideMenuItems = '+
|
||||||
MultipleTabService.showHideMenuItems.toSource().replace(
|
MultipleTabService.showHideMenuItems.toSource().replace(
|
||||||
'var separators = ',
|
'var separators = ',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (aPopup.id == 'multipletab-selection-menu') {
|
if (aPopup.id == 'multipletab-selection-menu') {
|
||||||
TreeStyleTabService.showHideSubTreeMenuItem(document.getElementById(TreeStyleTabService.kMENUITEM_REMOVESUBTREE_SELECTION), MultipleTabService.getSelectedTabs());
|
TreeStyleTabService.showHideSubTreeMenuItem(document.getElementById(TreeStyleTabService.kMENUITEM_REMOVESUBTREE_SELECTION), MultipleTabService.getSelectedTabs());
|
||||||
}
|
}
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
'{ var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);'
|
'{ var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);'
|
||||||
).replace(
|
).replace(
|
||||||
/e.screenY <= ((autoHIDE|ah).Win.boxObject).screenY \+ (autoHIDE.space|ah.senseArea)/,
|
/e.screenY <= ((autoHIDE|ah).Win.boxObject).screenY \+ (autoHIDE.space|ah.senseArea)/,
|
||||||
<><![CDATA[(e.screenY <= $1.screenY + $3 ||
|
<![CDATA[(e.screenY <= $1.screenY + $3 ||
|
||||||
(
|
(
|
||||||
treeStyleTabPos == 'left' ?
|
treeStyleTabPos == 'left' ?
|
||||||
(e.screenX <= $1.screenX + $3) :
|
(e.screenX <= $1.screenX + $3) :
|
||||||
@ -168,10 +168,10 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
treeStyleTabPos == 'bottom' ?
|
treeStyleTabPos == 'bottom' ?
|
||||||
(e.screenY >= $1.screenY + $1.height - $3) :
|
(e.screenY >= $1.screenY + $1.height - $3) :
|
||||||
false
|
false
|
||||||
))]]></>
|
))]]>
|
||||||
).replace( // for old version
|
).replace( // for old version
|
||||||
'e.screenY > getBrowser().mCurrentBrowser.boxObject.screenY + 25',
|
'e.screenY > getBrowser().mCurrentBrowser.boxObject.screenY + 25',
|
||||||
<><![CDATA[(e.screenY > gBrowser.mCurrentBrowser.boxObject.screenY + 25 &&
|
<![CDATA[(e.screenY > gBrowser.mCurrentBrowser.boxObject.screenY + 25 &&
|
||||||
(
|
(
|
||||||
treeStyleTabPos == 'left' ?
|
treeStyleTabPos == 'left' ?
|
||||||
(e.screenX > gBrowser.mCurrentBrowser.boxObject.screenX + 25) :
|
(e.screenX > gBrowser.mCurrentBrowser.boxObject.screenX + 25) :
|
||||||
@ -180,10 +180,10 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
treeStyleTabPos == 'bottom' ?
|
treeStyleTabPos == 'bottom' ?
|
||||||
(e.screenY < gBrowser.mCurrentBrowser.boxObject.screenY + gBrowser.mCurrentBrowser.boxObject.height - 25) :
|
(e.screenY < gBrowser.mCurrentBrowser.boxObject.screenY + gBrowser.mCurrentBrowser.boxObject.height - 25) :
|
||||||
true
|
true
|
||||||
))]]></>
|
))]]>
|
||||||
).replace( // for new version
|
).replace( // for new version
|
||||||
'e.screenY > yCondition',
|
'e.screenY > yCondition',
|
||||||
<><![CDATA[(e.screenY > yCondition &&
|
<![CDATA[(e.screenY > yCondition &&
|
||||||
(
|
(
|
||||||
treeStyleTabPos == 'left' ?
|
treeStyleTabPos == 'left' ?
|
||||||
(e.screenX > gBrowser.mCurrentBrowser.boxObject.screenX + 50) :
|
(e.screenX > gBrowser.mCurrentBrowser.boxObject.screenX + 50) :
|
||||||
@ -192,13 +192,13 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
treeStyleTabPos == 'bottom' ?
|
treeStyleTabPos == 'bottom' ?
|
||||||
(e.screenY < gBrowser.mCurrentBrowser.boxObject.screenY + gBrowser.mCurrentBrowser.boxObject.height - 50) :
|
(e.screenY < gBrowser.mCurrentBrowser.boxObject.screenY + gBrowser.mCurrentBrowser.boxObject.height - 50) :
|
||||||
true
|
true
|
||||||
))]]></>
|
))]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('autoHIDE.HideToolbar = '+
|
eval('autoHIDE.HideToolbar = '+
|
||||||
autoHIDE.HideToolbar.toSource().replace(
|
autoHIDE.HideToolbar.toSource().replace(
|
||||||
/if \(((this|ah).Show)\) \{/,
|
/if \(((this|ah).Show)\) \{/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
window.setTimeout('gBrowser.treeStyleTab.checkTabsIndentOverflow();', 0);
|
window.setTimeout('gBrowser.treeStyleTab.checkTabsIndentOverflow();', 0);
|
||||||
var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);
|
var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);
|
||||||
if ($1) {
|
if ($1) {
|
||||||
@ -207,40 +207,40 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
appcontent.__treestyletab__resized = false;
|
appcontent.__treestyletab__resized = false;
|
||||||
appcontent.style.margin = 0;
|
appcontent.style.margin = 0;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
func = 'RemoveAttrib' in autoHIDE ? 'RemoveAttrib' : 'EndFull' ;
|
func = 'RemoveAttrib' in autoHIDE ? 'RemoveAttrib' : 'EndFull' ;
|
||||||
eval('autoHIDE.'+func+' = '+
|
eval('autoHIDE.'+func+' = '+
|
||||||
autoHIDE[func].toSource().replace(
|
autoHIDE[func].toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
var appcontent = document.getElementById('appcontent');
|
var appcontent = document.getElementById('appcontent');
|
||||||
if (appcontent.__treestyletab__resized) {
|
if (appcontent.__treestyletab__resized) {
|
||||||
appcontent.__treestyletab__resized = false;
|
appcontent.__treestyletab__resized = false;
|
||||||
appcontent.style.margin = 0;
|
appcontent.style.margin = 0;
|
||||||
}
|
}
|
||||||
window.setTimeout('gBrowser.treeStyleTab.checkTabsIndentOverflow();', 0);
|
window.setTimeout('gBrowser.treeStyleTab.checkTabsIndentOverflow();', 0);
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('autoHIDE.SetMenu = '+
|
eval('autoHIDE.SetMenu = '+
|
||||||
autoHIDE.SetMenu.toSource().replace(
|
autoHIDE.SetMenu.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (arguments.length && arguments[0]) {
|
if (arguments.length && arguments[0]) {
|
||||||
var treeStyleTabSplitter = document.getAnonymousElementByAttribute(gBrowser, 'class', TreeStyleTabService.kSPLITTER);
|
var treeStyleTabSplitter = document.getAnonymousElementByAttribute(gBrowser, 'class', TreeStyleTabService.kSPLITTER);
|
||||||
gBrowser.treeStyleTab.tabbarWidth = gBrowser.mStrip.boxObject.width +
|
gBrowser.treeStyleTab.tabbarWidth = gBrowser.mStrip.boxObject.width +
|
||||||
(treeStyleTabSplitter ? treeStyleTabSplitter.boxObject.width : 0 );
|
(treeStyleTabSplitter ? treeStyleTabSplitter.boxObject.width : 0 );
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
func = 'MoveContent' in autoHIDE ? 'MoveContent' : 'MoveC' ;
|
func = 'MoveContent' in autoHIDE ? 'MoveContent' : 'MoveC' ;
|
||||||
eval('autoHIDE.'+func+' = '+
|
eval('autoHIDE.'+func+' = '+
|
||||||
autoHIDE[func].toSource().replace(
|
autoHIDE[func].toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);
|
var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);
|
||||||
if (!arguments.length) {
|
if (!arguments.length) {
|
||||||
var appcontent = document.getElementById('appcontent');
|
var appcontent = document.getElementById('appcontent');
|
||||||
@ -257,17 +257,17 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
window.setTimeout('autoHIDE.MoveC(true);', 100);
|
window.setTimeout('autoHIDE.MoveC(true);', 100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/.(move|setPosition)\(0, - (this|ah).delta\)/,
|
/.(move|setPosition)\(0, - (this|ah).delta\)/,
|
||||||
<><![CDATA[.$1(
|
<![CDATA[.$1(
|
||||||
(
|
(
|
||||||
treeStyleTabPos == 'left' ? -gBrowser.treeStyleTab.tabbarWidth :
|
treeStyleTabPos == 'left' ? -gBrowser.treeStyleTab.tabbarWidth :
|
||||||
treeStyleTabPos == 'right' ? gBrowser.treeStyleTab.tabbarWidth :
|
treeStyleTabPos == 'right' ? gBrowser.treeStyleTab.tabbarWidth :
|
||||||
0
|
0
|
||||||
),
|
),
|
||||||
-$2.delta
|
-$2.delta
|
||||||
)]]></>
|
)]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
var autoHideEventListener = {
|
var autoHideEventListener = {
|
||||||
@ -305,10 +305,10 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('window.TMupdateSettings = '+
|
eval('window.TMupdateSettings = '+
|
||||||
window.TMupdateSettings.toSource().replace(
|
window.TMupdateSettings.toSource().replace(
|
||||||
/(\{aTab.removeAttribute\("tabxleft"\);\})(\})/,
|
/(\{aTab.removeAttribute\("tabxleft"\);\})(\})/,
|
||||||
<><![CDATA[$1
|
<![CDATA[$1
|
||||||
gBrowser.treeStyleTab.initTabAttributes(aTab);
|
gBrowser.treeStyleTab.initTabAttributes(aTab);
|
||||||
gBrowser.treeStyleTab.initTabContentsOrder(aTab);
|
gBrowser.treeStyleTab.initTabContentsOrder(aTab);
|
||||||
$2]]></>
|
$2]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -316,10 +316,10 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('window.tabxTabAdded = '+
|
eval('window.tabxTabAdded = '+
|
||||||
window.tabxTabAdded.toSource().replace(
|
window.tabxTabAdded.toSource().replace(
|
||||||
/(\})(\)?)$/,
|
/(\})(\)?)$/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
gBrowser.treeStyleTab.initTabAttributes(aTab);
|
gBrowser.treeStyleTab.initTabAttributes(aTab);
|
||||||
gBrowser.treeStyleTab.initTabContentsOrder(aTab);
|
gBrowser.treeStyleTab.initTabContentsOrder(aTab);
|
||||||
$1$2]]></>
|
$1$2]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
gBrowser.mTabContainer.addEventListener('DOMNodeInserted', tabxTabAdded, true);
|
gBrowser.mTabContainer.addEventListener('DOMNodeInserted', tabxTabAdded, true);
|
||||||
@ -327,49 +327,49 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('window.TMP_TabDragGesture = '+
|
eval('window.TMP_TabDragGesture = '+
|
||||||
window.TMP_TabDragGesture.toSource().replace(
|
window.TMP_TabDragGesture.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||||
nsDragAndDrop.startDrag(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
nsDragAndDrop.startDrag(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('window.TMP_TabDragOver = '+
|
eval('window.TMP_TabDragOver = '+
|
||||||
window.TMP_TabDragOver.toSource().replace(
|
window.TMP_TabDragOver.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||||
nsDragAndDrop.dragOver(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
nsDragAndDrop.dragOver(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('window.TMP_TabDragDrop = '+
|
eval('window.TMP_TabDragDrop = '+
|
||||||
window.TMP_TabDragDrop.toSource().replace(
|
window.TMP_TabDragDrop.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||||
nsDragAndDrop.drop(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
nsDragAndDrop.drop(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('window.TMP_TabDragExit = '+
|
eval('window.TMP_TabDragExit = '+
|
||||||
window.TMP_TabDragExit.toSource().replace(
|
window.TMP_TabDragExit.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||||
nsDragAndDrop.dragExit(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
nsDragAndDrop.dragExit(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -402,19 +402,19 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
'var TSTTabBrowser = gBrowser;'
|
'var TSTTabBrowser = gBrowser;'
|
||||||
).replace(
|
).replace(
|
||||||
/(var newIndex =)/,
|
/(var newIndex =)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (isTabReorder && TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, aDragSession.sourceNode))
|
if (isTabReorder && TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, aDragSession.sourceNode))
|
||||||
return;
|
return;
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(aTab = gBrowser.addTab\(url\));/,
|
/(aTab = gBrowser.addTab\(url\));/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, $1);
|
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, $1);
|
||||||
return;
|
return;
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(aTab = event.target;)/,
|
/(aTab = event.target;)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
$1
|
$1
|
||||||
if (
|
if (
|
||||||
aTab.getAttribute('locked') == 'true' ||
|
aTab.getAttribute('locked') == 'true' ||
|
||||||
@ -424,7 +424,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, TSTTabBrowser.loadOneTab(url, null, null, null, bgLoad, false));
|
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, TSTTabBrowser.loadOneTab(url, null, null, null, bgLoad, false));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/aEvent/g, 'event'
|
/aEvent/g, 'event'
|
||||||
).replace(
|
).replace(
|
||||||
@ -435,32 +435,32 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('window.TM_BrowserHome = '+
|
eval('window.TM_BrowserHome = '+
|
||||||
window.TM_BrowserHome.toSource().replace(
|
window.TM_BrowserHome.toSource().replace(
|
||||||
/(var bgLoad = )/,
|
/(var bgLoad = )/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.readyToOpenChildTab(firstTabAdded, true);
|
TreeStyleTabService.readyToOpenChildTab(firstTabAdded, true);
|
||||||
$1
|
$1
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(\})(\)?)$/,
|
/(\})(\)?)$/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.stopToOpenChildTab(firstTabAdded);
|
TreeStyleTabService.stopToOpenChildTab(firstTabAdded);
|
||||||
$1$2
|
$1$2
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
eval('window.TMP_openURL = '+
|
eval('window.TMP_openURL = '+
|
||||||
window.TMP_openURL.toSource().replace(
|
window.TMP_openURL.toSource().replace(
|
||||||
/(var firstTab = [^\(]+\([^\)]+\))/,
|
/(var firstTab = [^\(]+\([^\)]+\))/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
$1;
|
$1;
|
||||||
TreeStyleTabService.readyToOpenChildTab(firstTab, true);
|
TreeStyleTabService.readyToOpenChildTab(firstTab, true);
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(anyBrowser.mTabContainer.nextTab)/,
|
/(anyBrowser.mTabContainer.nextTab)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.stopToOpenChildTab(firstTab);
|
TreeStyleTabService.stopToOpenChildTab(firstTab);
|
||||||
$1
|
$1
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -477,25 +477,25 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('TMP_Bookmark.openGroup = '+
|
eval('TMP_Bookmark.openGroup = '+
|
||||||
TMP_Bookmark.openGroup.toSource().replace(
|
TMP_Bookmark.openGroup.toSource().replace(
|
||||||
'index = prevTab._tPos + 1;',
|
'index = prevTab._tPos + 1;',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
index = gBrowser.treeStyleTab.getNextSiblingTab(gBrowser.treeStyleTab.getRootTab(prevTab));
|
index = gBrowser.treeStyleTab.getNextSiblingTab(gBrowser.treeStyleTab.getRootTab(prevTab));
|
||||||
if (tabToSelect == aTab) index = gBrowser.treeStyleTab.getNextSiblingTab(index);
|
if (tabToSelect == aTab) index = gBrowser.treeStyleTab.getNextSiblingTab(index);
|
||||||
index = index ? index._tPos : (prevTab._tPos + 1);
|
index = index ? index._tPos : (prevTab._tPos + 1);
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(prevTab = aTab;)/,
|
/(prevTab = aTab;)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
$1
|
$1
|
||||||
if (tabToSelect == aTab && TreeStyleTabService.getTreePref('openGroupBookmarkAsTabSubTree')) {
|
if (tabToSelect == aTab && TreeStyleTabService.getTreePref('openGroupBookmarkAsTabSubTree')) {
|
||||||
TreeStyleTabService.readyToOpenChildTab(tabToSelect, true, gBrowser.treeStyleTab.getNextSiblingTab(tabToSelect));
|
TreeStyleTabService.readyToOpenChildTab(tabToSelect, true, gBrowser.treeStyleTab.getNextSiblingTab(tabToSelect));
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(browser.mTabContainer.nextTab)/,
|
/(browser.mTabContainer.nextTab)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (TreeStyleTabService.getTreePref('openGroupBookmarkAsTabSubTree'))
|
if (TreeStyleTabService.getTreePref('openGroupBookmarkAsTabSubTree'))
|
||||||
TreeStyleTabService.stopToOpenChildTab(tabToSelect);
|
TreeStyleTabService.stopToOpenChildTab(tabToSelect);
|
||||||
$1]]></>
|
$1]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -512,12 +512,12 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('window.getRowHeight = '+
|
eval('window.getRowHeight = '+
|
||||||
window.getRowHeight.toSource().replace(
|
window.getRowHeight.toSource().replace(
|
||||||
'var tabs = getBrowser().mTabContainer.childNodes;',
|
'var tabs = getBrowser().mTabContainer.childNodes;',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
var tabsResult = TreeStyleTabService.getVisibleTabs(getBrowser().selectedTab);
|
var tabsResult = TreeStyleTabService.getVisibleTabs(getBrowser().selectedTab);
|
||||||
var tabs = [];
|
var tabs = [];
|
||||||
for (var t = 0, maxt = tabsResult.snapshotLength; t < maxt; t++)
|
for (var t = 0, maxt = tabsResult.snapshotLength; t < maxt; t++)
|
||||||
tabs.push(tabsResult.snapshotItem(t));
|
tabs.push(tabsResult.snapshotItem(t));
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/tabs.item\(([^\)]+)\)/g,
|
/tabs.item\(([^\)]+)\)/g,
|
||||||
'tabs[$1]'
|
'tabs[$1]'
|
||||||
@ -585,12 +585,12 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('superDrag.onDrop = '+
|
eval('superDrag.onDrop = '+
|
||||||
superDrag.onDrop.toSource().replace(
|
superDrag.onDrop.toSource().replace(
|
||||||
/(var newTab = getBrowser\(\).addTab\([^\)]+\);)/g,
|
/(var newTab = getBrowser\(\).addTab\([^\)]+\);)/g,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (aDragSession.sourceNode &&
|
if (aDragSession.sourceNode &&
|
||||||
aDragSession.sourceNode.ownerDocument.defaultView.top == getBrowser().contentWindow)
|
aDragSession.sourceNode.ownerDocument.defaultView.top == getBrowser().contentWindow)
|
||||||
TreeStyleTabService.readyToOpenChildTab(getBrowser());
|
TreeStyleTabService.readyToOpenChildTab(getBrowser());
|
||||||
$1
|
$1
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -611,18 +611,18 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('ddg_ges.Open = '+
|
eval('ddg_ges.Open = '+
|
||||||
ddg_ges.Open.toSource().replace(
|
ddg_ges.Open.toSource().replace(
|
||||||
'if (mode[1] == "h" || mode[1] == "f") {',
|
'if (mode[1] == "h" || mode[1] == "f") {',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if ('sourceNode' in aData) // only for dragging from the content tarea.
|
if ('sourceNode' in aData) // only for dragging from the content tarea.
|
||||||
TreeStyleTabService.readyToOpenChildTab(getBrowser());
|
TreeStyleTabService.readyToOpenChildTab(getBrowser());
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('ddg_ges.Search = '+
|
eval('ddg_ges.Search = '+
|
||||||
ddg_ges.Search.toSource().replace(
|
ddg_ges.Search.toSource().replace(
|
||||||
'if (mode[1] == "h" || mode[1] == "f") {',
|
'if (mode[1] == "h" || mode[1] == "f") {',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
TreeStyleTabService.readyToOpenChildTab(getBrowser());
|
TreeStyleTabService.readyToOpenChildTab(getBrowser());
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -655,45 +655,45 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('FireGestures.onExtraGesture = '+
|
eval('FireGestures.onExtraGesture = '+
|
||||||
FireGestures.onExtraGesture.toSource().replace(
|
FireGestures.onExtraGesture.toSource().replace(
|
||||||
'case "keypress-stop":',
|
'case "keypress-stop":',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
TreeStyleTabService.readyToOpenChildTab(gBrowser, true);
|
TreeStyleTabService.readyToOpenChildTab(gBrowser, true);
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
'break;case "gesture-timeout":',
|
'break;case "gesture-timeout":',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.stopToOpenChildTab(gBrowser);
|
TreeStyleTabService.stopToOpenChildTab(gBrowser);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('FireGestures._performAction = '+
|
eval('FireGestures._performAction = '+
|
||||||
FireGestures._performAction.toSource().replace(
|
FireGestures._performAction.toSource().replace(
|
||||||
'gBrowser.loadOneTab(',
|
'gBrowser.loadOneTab(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.readyToOpenChildTab(gBrowser);
|
TreeStyleTabService.readyToOpenChildTab(gBrowser);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('FireGestures.openURLsInSelection = '+
|
eval('FireGestures.openURLsInSelection = '+
|
||||||
FireGestures.openURLsInSelection.toSource().replace(
|
FireGestures.openURLsInSelection.toSource().replace(
|
||||||
'var tab =',
|
'var tab =',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (!TreeStyleTabService.checkToOpenChildTab(gBrowser))
|
if (!TreeStyleTabService.checkToOpenChildTab(gBrowser))
|
||||||
TreeStyleTabService.readyToOpenChildTab(gBrowser, true);
|
TreeStyleTabService.readyToOpenChildTab(gBrowser, true);
|
||||||
$&]]></>
|
$&]]>
|
||||||
).replace(
|
).replace(
|
||||||
'if (!flag)',
|
'if (!flag)',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (TreeStyleTabService.checkToOpenChildTab(gBrowser))
|
if (TreeStyleTabService.checkToOpenChildTab(gBrowser))
|
||||||
TreeStyleTabService.stopToOpenChildTab(gBrowser);
|
TreeStyleTabService.stopToOpenChildTab(gBrowser);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('FireGestures.handleEvent = '+
|
eval('FireGestures.handleEvent = '+
|
||||||
FireGestures.handleEvent.toSource().replace(
|
FireGestures.handleEvent.toSource().replace(
|
||||||
'gBrowser.loadOneTab(',
|
'gBrowser.loadOneTab(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.readyToOpenChildTab(gBrowser);
|
TreeStyleTabService.readyToOpenChildTab(gBrowser);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -963,12 +963,12 @@ var TreeStyleTabService = {
|
|||||||
eval('nsBrowserAccess.prototype.openURI = '+
|
eval('nsBrowserAccess.prototype.openURI = '+
|
||||||
nsBrowserAccess.prototype.openURI.toSource().replace(
|
nsBrowserAccess.prototype.openURI.toSource().replace(
|
||||||
/(switch\s*\(aWhere\))/,
|
/(switch\s*\(aWhere\))/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (aOpener &&
|
if (aOpener &&
|
||||||
aWhere == Components.interfaces.nsIBrowserDOMWindow.OPEN_NEWTAB) {
|
aWhere == Components.interfaces.nsIBrowserDOMWindow.OPEN_NEWTAB) {
|
||||||
TreeStyleTabService.readyToOpenChildTab(aOpener);
|
TreeStyleTabService.readyToOpenChildTab(aOpener);
|
||||||
}
|
}
|
||||||
$1]]></>
|
$1]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1040,7 +1040,7 @@ var TreeStyleTabService = {
|
|||||||
/\.height/g, '[TreeStyleTabService.getTabBrowserFromChild(TSTTabBrowser).treeStyleTab.invertedSizeProp]'
|
/\.height/g, '[TreeStyleTabService.getTabBrowserFromChild(TSTTabBrowser).treeStyleTab.invertedSizeProp]'
|
||||||
).replace(
|
).replace(
|
||||||
/(return (?:true|dt.effectAllowed = "copyMove");)/,
|
/(return (?:true|dt.effectAllowed = "copyMove");)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (!(function(aSelf) {
|
if (!(function(aSelf) {
|
||||||
try{
|
try{
|
||||||
var node = TST_DRAGSESSION.sourceNode;
|
var node = TST_DRAGSESSION.sourceNode;
|
||||||
@ -1065,7 +1065,7 @@ catch(e) {
|
|||||||
return TST_DRAGDROP_DISALLOW_RETRUN_VALUE;
|
return TST_DRAGDROP_DISALLOW_RETRUN_VALUE;
|
||||||
}
|
}
|
||||||
$1
|
$1
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/TST_DRAGSESSION/g,
|
/TST_DRAGSESSION/g,
|
||||||
(canDropFunctionName == 'canDrop' ?
|
(canDropFunctionName == 'canDrop' ?
|
||||||
@ -1087,7 +1087,7 @@ catch(e) {
|
|||||||
eval('aObserver.'+dragOverFunctionName+' = '+
|
eval('aObserver.'+dragOverFunctionName+' = '+
|
||||||
aObserver[dragOverFunctionName].toSource().replace(
|
aObserver[dragOverFunctionName].toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
{
|
{
|
||||||
var TSTTabBrowser = this;
|
var TSTTabBrowser = this;
|
||||||
if ((function(aSelf) {
|
if ((function(aSelf) {
|
||||||
@ -1118,7 +1118,7 @@ catch(e) {
|
|||||||
})(TSTTabBrowser)) {
|
})(TSTTabBrowser)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/TST_DRAGSESSION/g,
|
/TST_DRAGSESSION/g,
|
||||||
(canDropFunctionName == 'canDrop' ?
|
(canDropFunctionName == 'canDrop' ?
|
||||||
@ -1150,48 +1150,48 @@ catch(e) {
|
|||||||
eval('aObserver.'+dropFunctionName+' = '+
|
eval('aObserver.'+dropFunctionName+' = '+
|
||||||
aObserver[dropFunctionName].toSource().replace(
|
aObserver[dropFunctionName].toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
{
|
{
|
||||||
var TSTTabBrowser = this;
|
var TSTTabBrowser = this;
|
||||||
TSTTabBrowser.treeStyleTab.clearDropPosition();
|
TSTTabBrowser.treeStyleTab.clearDropPosition();
|
||||||
var dropActionInfo = TSTTabBrowser.treeStyleTab.getDropAction(aEvent, TST_DRAGSESSION);
|
var dropActionInfo = TSTTabBrowser.treeStyleTab.getDropAction(aEvent, TST_DRAGSESSION);
|
||||||
]]></>
|
]]>
|
||||||
).replace( // Firefox 2
|
).replace( // Firefox 2
|
||||||
/(if \(aDragSession[^\)]+\) \{)/,
|
/(if \(aDragSession[^\)]+\) \{)/,
|
||||||
<><![CDATA[$1
|
<![CDATA[$1
|
||||||
if (TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, TST_DRAGSESSION.sourceNode))
|
if (TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, TST_DRAGSESSION.sourceNode))
|
||||||
return;
|
return;
|
||||||
]]></>
|
]]>
|
||||||
).replace( // Firefox 3.0.x, 3.1 or later
|
).replace( // Firefox 3.0.x, 3.1 or later
|
||||||
/(if \((accelKeyPressed|isCopy|dropEffect == "copy")\) {)/,
|
/(if \((accelKeyPressed|isCopy|dropEffect == "copy")\) {)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, draggedTab))
|
if (TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, draggedTab))
|
||||||
return;
|
return;
|
||||||
$1]]></>
|
$1]]>
|
||||||
).replace( // Firefox 3, duplication of tab
|
).replace( // Firefox 3, duplication of tab
|
||||||
/(this.selectedTab = newTab;)(\s*\})?/g,
|
/(this.selectedTab = newTab;)(\s*\})?/g,
|
||||||
<><![CDATA[$1;
|
<![CDATA[$1;
|
||||||
if (dropActionInfo.position == TreeStyleTabService.kDROP_ON)
|
if (dropActionInfo.position == TreeStyleTabService.kDROP_ON)
|
||||||
TSTTabBrowser.treeStyleTab.attachTabTo(newTab, dropActionInfo.target);
|
TSTTabBrowser.treeStyleTab.attachTabTo(newTab, dropActionInfo.target);
|
||||||
$2]]></>
|
$2]]>
|
||||||
).replace( // Firefox 3, dragging tab from another window
|
).replace( // Firefox 3, dragging tab from another window
|
||||||
'else if (draggedTab) {',
|
'else if (draggedTab) {',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, draggedTab))
|
if (TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, draggedTab))
|
||||||
return;
|
return;
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(this.loadOneTab\([^;]+\));/,
|
/(this.loadOneTab\([^;]+\));/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, $1);
|
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, $1);
|
||||||
return;
|
return;
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
'document.getBindingParent(aEvent.originalTarget).localName != "tab"',
|
'document.getBindingParent(aEvent.originalTarget).localName != "tab"',
|
||||||
'!TreeStyleTabService.getTabFromEvent(aEvent)'
|
'!TreeStyleTabService.getTabFromEvent(aEvent)'
|
||||||
).replace(
|
).replace(
|
||||||
'var tab = aEvent.target;',
|
'var tab = aEvent.target;',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (
|
if (
|
||||||
tab.getAttribute('locked') == 'true' || // Tab Mix Plus
|
tab.getAttribute('locked') == 'true' || // Tab Mix Plus
|
||||||
TreeStyleTabService.getTreePref('loadDroppedLinkToNewChildTab') ||
|
TreeStyleTabService.getTreePref('loadDroppedLinkToNewChildTab') ||
|
||||||
@ -1200,7 +1200,7 @@ catch(e) {
|
|||||||
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, TSTTabBrowser.loadOneTab(getShortcutOrURI(url), null, null, null, bgLoad, false));
|
TSTTabBrowser.treeStyleTab.performDrop(dropActionInfo, TSTTabBrowser.loadOneTab(getShortcutOrURI(url), null, null, null, bgLoad, false));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/TST_DRAGSESSION/g,
|
/TST_DRAGSESSION/g,
|
||||||
(canDropFunctionName == 'canDrop' ?
|
(canDropFunctionName == 'canDrop' ?
|
||||||
@ -1263,45 +1263,45 @@ catch(e) {
|
|||||||
eval('nsContextMenu.prototype.openLinkInTab = '+
|
eval('nsContextMenu.prototype.openLinkInTab = '+
|
||||||
nsContextMenu.prototype.openLinkInTab.toSource().replace(
|
nsContextMenu.prototype.openLinkInTab.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('nsContextMenu.prototype.openFrameInTab = '+
|
eval('nsContextMenu.prototype.openFrameInTab = '+
|
||||||
nsContextMenu.prototype.openFrameInTab.toSource().replace(
|
nsContextMenu.prototype.openFrameInTab.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
var viewImageMethod = ('viewImage' in nsContextMenu.prototype) ? 'viewImage' : 'viewMedia' ;
|
var viewImageMethod = ('viewImage' in nsContextMenu.prototype) ? 'viewImage' : 'viewMedia' ;
|
||||||
eval('nsContextMenu.prototype.'+viewImageMethod+' = '+
|
eval('nsContextMenu.prototype.'+viewImageMethod+' = '+
|
||||||
nsContextMenu.prototype[viewImageMethod].toSource().replace(
|
nsContextMenu.prototype[viewImageMethod].toSource().replace(
|
||||||
'openUILink(',
|
'openUILink(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (String(whereToOpenLink(e, false, true)).indexOf('tab') == 0)
|
if (String(whereToOpenLink(e, false, true)).indexOf('tab') == 0)
|
||||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('nsContextMenu.prototype.viewBGImage = '+
|
eval('nsContextMenu.prototype.viewBGImage = '+
|
||||||
nsContextMenu.prototype.viewBGImage.toSource().replace(
|
nsContextMenu.prototype.viewBGImage.toSource().replace(
|
||||||
'openUILink(',
|
'openUILink(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (String(whereToOpenLink(e, false, true)).indexOf('tab') == 0)
|
if (String(whereToOpenLink(e, false, true)).indexOf('tab') == 0)
|
||||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('nsContextMenu.prototype.addDictionaries = '+
|
eval('nsContextMenu.prototype.addDictionaries = '+
|
||||||
nsContextMenu.prototype.addDictionaries.toSource().replace(
|
nsContextMenu.prototype.addDictionaries.toSource().replace(
|
||||||
'openUILinkIn(',
|
'openUILinkIn(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (where.indexOf('tab') == 0)
|
if (where.indexOf('tab') == 0)
|
||||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1314,12 +1314,12 @@ catch(e) {
|
|||||||
eval('window.'+funcs[i]+' = '+
|
eval('window.'+funcs[i]+' = '+
|
||||||
window[funcs[i]].toSource().replace(
|
window[funcs[i]].toSource().replace(
|
||||||
/(openNewTabWith\()/g,
|
/(openNewTabWith\()/g,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (!TreeStyleTabService.checkToOpenChildTab(event.target.ownerDocument.defaultView)) TreeStyleTabService.readyToOpenChildTab(event.target.ownerDocument.defaultView);
|
if (!TreeStyleTabService.checkToOpenChildTab(event.target.ownerDocument.defaultView)) TreeStyleTabService.readyToOpenChildTab(event.target.ownerDocument.defaultView);
|
||||||
$1]]></>
|
$1]]>
|
||||||
).replace(
|
).replace(
|
||||||
/(event.ctrlKey|event.metaKey)/,
|
/(event.ctrlKey|event.metaKey)/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.checkReadyToOpenNewTab({
|
TreeStyleTabService.checkReadyToOpenNewTab({
|
||||||
uri : href,
|
uri : href,
|
||||||
external : {
|
external : {
|
||||||
@ -1332,12 +1332,12 @@ catch(e) {
|
|||||||
modifier : $1,
|
modifier : $1,
|
||||||
invert : TreeStyleTabService.getTreePref('link.invertDefaultBehavior')
|
invert : TreeStyleTabService.getTreePref('link.invertDefaultBehavior')
|
||||||
}) ? true : (TreeStyleTabService.readyToOpenChildTab(), false)
|
}) ? true : (TreeStyleTabService.readyToOpenChildTab(), false)
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/* あらゆるリンクからタブを開く設定の時に、アクセルキーが押されていた場合は
|
/* あらゆるリンクからタブを開く設定の時に、アクセルキーが押されていた場合は
|
||||||
反転された動作(通常のリンク読み込み)を行う */
|
反転された動作(通常のリンク読み込み)を行う */
|
||||||
'return false;case 1:',
|
'return false;case 1:',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (!('TMP_contentAreaClick' in window) && // do nothing for Tab Mix Plus
|
if (!('TMP_contentAreaClick' in window) && // do nothing for Tab Mix Plus
|
||||||
TreeStyleTabService.checkToOpenChildTab()) {
|
TreeStyleTabService.checkToOpenChildTab()) {
|
||||||
TreeStyleTabService.stopToOpenChildTab();
|
TreeStyleTabService.stopToOpenChildTab();
|
||||||
@ -1356,7 +1356,7 @@ catch(e) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case 1:
|
case 1:
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -1370,7 +1370,7 @@ catch(e) {
|
|||||||
eval(aName + ' = '+
|
eval(aName + ' = '+
|
||||||
overwroteFunc.toSource().replace(
|
overwroteFunc.toSource().replace(
|
||||||
/((openWebPanel\([^\;]+\);|PlacesUIUtils.showMinimalAddBookmarkUI\([^;]+\);)event.preventDefault\(\);return false;\})/,
|
/((openWebPanel\([^\;]+\);|PlacesUIUtils.showMinimalAddBookmarkUI\([^;]+\);)event.preventDefault\(\);return false;\})/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
$1
|
$1
|
||||||
else if (!('TMP_contentAreaClick' in window) && // do nothing for Tab Mix Plus
|
else if (!('TMP_contentAreaClick' in window) && // do nothing for Tab Mix Plus
|
||||||
TreeStyleTabService.checkReadyToOpenNewTab({
|
TreeStyleTabService.checkReadyToOpenNewTab({
|
||||||
@ -1388,7 +1388,7 @@ catch(e) {
|
|||||||
handleLinkClick(event, wrapper.href, linkNode);
|
handleLinkClick(event, wrapper.href, linkNode);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -1410,10 +1410,10 @@ catch(e) {
|
|||||||
eval('window.'+funcs[i]+' = '+
|
eval('window.'+funcs[i]+' = '+
|
||||||
window[funcs[i]].toSource().replace(
|
window[funcs[i]].toSource().replace(
|
||||||
/(openUILinkIn\()/g,
|
/(openUILinkIn\()/g,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (where == 'tab' || where == 'tabshifted')
|
if (where == 'tab' || where == 'tabshifted')
|
||||||
TreeStyleTabService.readyToOpenChildTab();
|
TreeStyleTabService.readyToOpenChildTab();
|
||||||
$1]]></>
|
$1]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1426,9 +1426,9 @@ catch(e) {
|
|||||||
eval(aName + ' = '+
|
eval(aName + ' = '+
|
||||||
overwroteFunc.toSource().replace(
|
overwroteFunc.toSource().replace(
|
||||||
'gBrowser.loadTabs(',
|
'gBrowser.loadTabs(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
TreeStyleTabService.readyToOpenNewTabGroup(gBrowser);
|
TreeStyleTabService.readyToOpenNewTabGroup(gBrowser);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -1440,10 +1440,10 @@ catch(e) {
|
|||||||
eval('FeedHandler.loadFeed = '+
|
eval('FeedHandler.loadFeed = '+
|
||||||
FeedHandler.loadFeed.toSource().replace(
|
FeedHandler.loadFeed.toSource().replace(
|
||||||
'openUILink(',
|
'openUILink(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (String(whereToOpenLink(event, false, true)).indexOf('tab') == 0)
|
if (String(whereToOpenLink(event, false, true)).indexOf('tab') == 0)
|
||||||
TreeStyleTabService.readyToOpenChildTab(gBrowser);
|
TreeStyleTabService.readyToOpenChildTab(gBrowser);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -185,29 +185,29 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
eval('b.mTabContainer.'+selectNewTab+' = '+
|
eval('b.mTabContainer.'+selectNewTab+' = '+
|
||||||
b.mTabContainer[selectNewTab].toSource().replace(
|
b.mTabContainer[selectNewTab].toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (arguments[0].__treestyletab__preventSelect) {
|
if (arguments[0].__treestyletab__preventSelect) {
|
||||||
arguments[0].__treestyletab__preventSelect = false;
|
arguments[0].__treestyletab__preventSelect = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
eval('b.mTabContainer.adjustTabstrip = '+
|
eval('b.mTabContainer.adjustTabstrip = '+
|
||||||
b.mTabContainer.adjustTabstrip.toSource().replace(
|
b.mTabContainer.adjustTabstrip.toSource().replace(
|
||||||
/(\})(\)?)$/,
|
/(\})(\)?)$/,
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
var b = TreeStyleTabService.getTabBrowserFromChild(this);
|
var b = TreeStyleTabService.getTabBrowserFromChild(this);
|
||||||
b.treeStyleTab.updateInvertedTabContentsOrder(true);
|
b.treeStyleTab.updateInvertedTabContentsOrder(true);
|
||||||
$1$2]]></>
|
$1$2]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
eval('b.mTabContainer.advanceSelectedTab = '+
|
eval('b.mTabContainer.advanceSelectedTab = '+
|
||||||
b.mTabContainer.advanceSelectedTab.toSource().replace(
|
b.mTabContainer.advanceSelectedTab.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if (TreeStyleTabService.getTreePref('focusMode') == TreeStyleTabService.kFOCUS_VISIBLE) {
|
if (TreeStyleTabService.getTreePref('focusMode') == TreeStyleTabService.kFOCUS_VISIBLE) {
|
||||||
(function(aDir, aWrap, aSelf) {
|
(function(aDir, aWrap, aSelf) {
|
||||||
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(aSelf).treeStyleTab;
|
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(aSelf).treeStyleTab;
|
||||||
@ -230,14 +230,14 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
})(arguments[0], arguments[1], this);
|
})(arguments[0], arguments[1], this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
eval('b.mTabContainer._handleTabSelect = '+
|
eval('b.mTabContainer._handleTabSelect = '+
|
||||||
b.mTabContainer._handleTabSelect.toSource().replace(
|
b.mTabContainer._handleTabSelect.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
if ((function(aTabs) {
|
if ((function(aTabs) {
|
||||||
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(aTabs).treeStyleTab;
|
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(aTabs).treeStyleTab;
|
||||||
var tab = aTabs.selectedItem;
|
var tab = aTabs.selectedItem;
|
||||||
@ -249,7 +249,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
})(this)) {
|
})(this)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -259,11 +259,11 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
eval('b.mTabContainer.mTabstrip.ensureElementIsVisible = '+
|
eval('b.mTabContainer.mTabstrip.ensureElementIsVisible = '+
|
||||||
b.mTabContainer.mTabstrip.ensureElementIsVisible.toSource().replace(
|
b.mTabContainer.mTabstrip.ensureElementIsVisible.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
var browser = TreeStyleTabService.getTabBrowserFromChild(this);
|
var browser = TreeStyleTabService.getTabBrowserFromChild(this);
|
||||||
var startProp = browser.treeStyleTab.isVertical ? 'top' : 'left' ;
|
var startProp = browser.treeStyleTab.isVertical ? 'top' : 'left' ;
|
||||||
var endProp = browser.treeStyleTab.isVertical ? 'bottom' : 'right' ;
|
var endProp = browser.treeStyleTab.isVertical ? 'bottom' : 'right' ;
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
/\.left/g, '[startProp]'
|
/\.left/g, '[startProp]'
|
||||||
).replace(
|
).replace(
|
||||||
@ -275,15 +275,15 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
eval('b.mTabContainer.mTabstrip._smoothScrollByPixels = '+
|
eval('b.mTabContainer.mTabstrip._smoothScrollByPixels = '+
|
||||||
b.mTabContainer.mTabstrip._smoothScrollByPixels.toSource().replace(
|
b.mTabContainer.mTabstrip._smoothScrollByPixels.toSource().replace(
|
||||||
'{',
|
'{',
|
||||||
<><![CDATA[$&
|
<![CDATA[$&
|
||||||
var TST = TreeStyleTabService.getTabBrowserFromChild(this);
|
var TST = TreeStyleTabService.getTabBrowserFromChild(this);
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
'scrollBy(distance, 0)',
|
'scrollBy(distance, 0)',
|
||||||
<><![CDATA[scrollBy(
|
<![CDATA[scrollBy(
|
||||||
(TST.isVertical ? 0 : distance ),
|
(TST.isVertical ? 0 : distance ),
|
||||||
(TST.isVertical ? distance : 0 )
|
(TST.isVertical ? distance : 0 )
|
||||||
)]]></>
|
)]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -320,15 +320,15 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
'tabPos + 1', 'nextTab._tPos'
|
'tabPos + 1', 'nextTab._tPos'
|
||||||
).replace(
|
).replace(
|
||||||
'this.moveTabTo(',
|
'this.moveTabTo(',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
var descendant = this.treeStyleTab.getDescendantTabs(nextTab);
|
var descendant = this.treeStyleTab.getDescendantTabs(nextTab);
|
||||||
if (descendant.length) {
|
if (descendant.length) {
|
||||||
nextTab = descendant[descendant.length-1];
|
nextTab = descendant[descendant.length-1];
|
||||||
}
|
}
|
||||||
$&]]></>
|
$&]]>
|
||||||
).replace(
|
).replace(
|
||||||
'this.moveTabToStart();',
|
'this.moveTabToStart();',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
this.treeStyleTab.internallyTabMoving = true;
|
this.treeStyleTab.internallyTabMoving = true;
|
||||||
var parentTab = this.treeStyleTab.getParentTab(this.mCurrentTab);
|
var parentTab = this.treeStyleTab.getParentTab(this.mCurrentTab);
|
||||||
if (parentTab) {
|
if (parentTab) {
|
||||||
@ -339,7 +339,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
$&
|
$&
|
||||||
}
|
}
|
||||||
this.treeStyleTab.internallyTabMoving = false;
|
this.treeStyleTab.internallyTabMoving = false;
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
'tabPos - 1', 'prevTab._tPos'
|
'tabPos - 1', 'prevTab._tPos'
|
||||||
).replace(
|
).replace(
|
||||||
'this.moveTabToEnd();',
|
'this.moveTabToEnd();',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
this.treeStyleTab.internallyTabMoving = true;
|
this.treeStyleTab.internallyTabMoving = true;
|
||||||
var parentTab = this.treeStyleTab.getParentTab(this.mCurrentTab);
|
var parentTab = this.treeStyleTab.getParentTab(this.mCurrentTab);
|
||||||
if (parentTab) {
|
if (parentTab) {
|
||||||
@ -364,58 +364,58 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
$&
|
$&
|
||||||
}
|
}
|
||||||
this.treeStyleTab.internallyTabMoving = false;
|
this.treeStyleTab.internallyTabMoving = false;
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
eval('b._keyEventHandler.handleEvent = '+
|
eval('b._keyEventHandler.handleEvent = '+
|
||||||
b._keyEventHandler.handleEvent.toSource().replace(
|
b._keyEventHandler.handleEvent.toSource().replace(
|
||||||
'this.tabbrowser.moveTabOver(aEvent);',
|
'this.tabbrowser.moveTabOver(aEvent);',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (!this.tabbrowser.treeStyleTab.isVertical ||
|
if (!this.tabbrowser.treeStyleTab.isVertical ||
|
||||||
!this.tabbrowser.treeStyleTab.moveTabLevel(aEvent)) {
|
!this.tabbrowser.treeStyleTab.moveTabLevel(aEvent)) {
|
||||||
$&
|
$&
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
'this.tabbrowser.moveTabForward();',
|
'this.tabbrowser.moveTabForward();',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (this.tabbrowser.treeStyleTab.isVertical ||
|
if (this.tabbrowser.treeStyleTab.isVertical ||
|
||||||
!this.tabbrowser.treeStyleTab.moveTabLevel(aEvent)) {
|
!this.tabbrowser.treeStyleTab.moveTabLevel(aEvent)) {
|
||||||
$&
|
$&
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
).replace(
|
).replace(
|
||||||
'this.tabbrowser.moveTabBackward();',
|
'this.tabbrowser.moveTabBackward();',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (this.tabbrowser.treeStyleTab.isVertical ||
|
if (this.tabbrowser.treeStyleTab.isVertical ||
|
||||||
!this.tabbrowser.treeStyleTab.moveTabLevel(aEvent)) {
|
!this.tabbrowser.treeStyleTab.moveTabLevel(aEvent)) {
|
||||||
$&
|
$&
|
||||||
}
|
}
|
||||||
]]></>
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
eval('b.loadTabs = '+
|
eval('b.loadTabs = '+
|
||||||
b.loadTabs.toSource().replace(
|
b.loadTabs.toSource().replace(
|
||||||
'var tabNum = ',
|
'var tabNum = ',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (this.treeStyleTab.readyToAttachNewTabGroup)
|
if (this.treeStyleTab.readyToAttachNewTabGroup)
|
||||||
TreeStyleTabService.readyToOpenChildTab(firstTabAdded || this.selectedTab, true);
|
TreeStyleTabService.readyToOpenChildTab(firstTabAdded || this.selectedTab, true);
|
||||||
$&]]></>
|
$&]]>
|
||||||
).replace(
|
).replace(
|
||||||
'if (!aLoadInBackground)',
|
'if (!aLoadInBackground)',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
if (TreeStyleTabService.checkToOpenChildTab(this))
|
if (TreeStyleTabService.checkToOpenChildTab(this))
|
||||||
TreeStyleTabService.stopToOpenChildTab(this);
|
TreeStyleTabService.stopToOpenChildTab(this);
|
||||||
$&]]></>
|
$&]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
eval('b.createTooltip = '+
|
eval('b.createTooltip = '+
|
||||||
b.createTooltip.toSource().replace(
|
b.createTooltip.toSource().replace(
|
||||||
'if (tn.hasAttribute("label")) {',
|
'if (tn.hasAttribute("label")) {',
|
||||||
<><![CDATA[
|
<![CDATA[
|
||||||
else if (tn.getAttribute(TreeStyleTabService.kTWISTY_HOVER) == 'true') {
|
else if (tn.getAttribute(TreeStyleTabService.kTWISTY_HOVER) == 'true') {
|
||||||
var key = tn.getAttribute(TreeStyleTabService.kSUBTREE_COLLAPSED) == 'true' ? 'tooltip.expandSubtree' : 'tooltip.collapseSubtree' ;
|
var key = tn.getAttribute(TreeStyleTabService.kSUBTREE_COLLAPSED) == 'true' ? 'tooltip.expandSubtree' : 'tooltip.collapseSubtree' ;
|
||||||
event.target.setAttribute(
|
event.target.setAttribute(
|
||||||
@ -429,7 +429,17 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$&]]></>
|
$&]]>
|
||||||
|
).replace(
|
||||||
|
'{',
|
||||||
|
<![CDATA[$&
|
||||||
|
if ((function(aTabBrowser) {
|
||||||
|
var TST = aTabBrowser.treeStyleTab;
|
||||||
|
var session = TST.getCurrentDragSession();
|
||||||
|
return session && TST.getTabFromChild(session.sourceNode);
|
||||||
|
})(this))
|
||||||
|
return false;
|
||||||
|
]]>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user