cosmetic
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1930 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
6c44f84308
commit
59a639853c
@ -41,12 +41,12 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
if ('MultipleTabService' in window) { // Multiple Tab Handler
|
if ('MultipleTabService' in window) { // Multiple Tab Handler
|
||||||
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.showHideRemoveSubTreeMenuItem(document.getElementById(TreeStyleTabService.kMENUITEM_REMOVESUBTREE_SELECTION), MultipleTabService.getSelectedTabs());
|
TreeStyleTabService.showHideRemoveSubTreeMenuItem(document.getElementById(TreeStyleTabService.kMENUITEM_REMOVESUBTREE_SELECTION), MultipleTabService.getSelectedTabs());
|
||||||
}
|
}
|
||||||
var separators = ]]></>
|
$&]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -100,51 +100,48 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
eval('autoHIDE.EndFull = '+
|
eval('autoHIDE.EndFull = '+
|
||||||
autoHIDE.EndFull.toSource().replace(
|
autoHIDE.EndFull.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 );
|
}
|
||||||
}
|
|
||||||
]]></>
|
]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('autoHIDE.MoveC = '+
|
eval('autoHIDE.MoveC = '+
|
||||||
autoHIDE.MoveC.toSource().replace(
|
autoHIDE.MoveC.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');
|
if (treeStyleTabPos == 'left' &&
|
||||||
if (treeStyleTabPos == 'left' &&
|
!appcontent.__treestyletab__resized) {
|
||||||
!appcontent.__treestyletab__resized) {
|
appcontent.style.marginRight = '-'+gBrowser.treeStyleTab.tabbarWidth+'px';
|
||||||
appcontent.style.marginRight = '-'+gBrowser.treeStyleTab.tabbarWidth+'px';
|
appcontent.__treestyletab__resized = true;
|
||||||
appcontent.__treestyletab__resized = true;
|
|
||||||
}
|
|
||||||
else if (treeStyleTabPos == 'right' &&
|
|
||||||
!appcontent.__treestyletab__resized) {
|
|
||||||
appcontent.style.marginLeft = '-'+gBrowser.treeStyleTab.tabbarWidth+'px';
|
|
||||||
appcontent.__treestyletab__resized = true;
|
|
||||||
}
|
|
||||||
window.setTimeout('autoHIDE.MoveC(true);', 100);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else if (treeStyleTabPos == 'right' &&
|
||||||
|
!appcontent.__treestyletab__resized) {
|
||||||
|
appcontent.style.marginLeft = '-'+gBrowser.treeStyleTab.tabbarWidth+'px';
|
||||||
|
appcontent.__treestyletab__resized = true;
|
||||||
|
}
|
||||||
|
window.setTimeout('autoHIDE.MoveC(true);', 100);
|
||||||
|
return;
|
||||||
|
}
|
||||||
]]></>
|
]]></>
|
||||||
).replace(
|
).replace(
|
||||||
'.move(0, - this.delta)',
|
'.move(0, - this.delta)',
|
||||||
@ -215,8 +212,7 @@ 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();
|
||||||
@ -228,8 +224,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
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();
|
||||||
@ -241,8 +236,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
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();
|
||||||
@ -254,8 +248,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
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();
|
||||||
|
@ -961,7 +961,7 @@ catch(e) {
|
|||||||
forceChild : TreeStyleTabService.getTreePref('urlbar.loadDifferentDomainToNewTab.asChild')
|
forceChild : TreeStyleTabService.getTreePref('urlbar.loadDifferentDomainToNewTab.asChild')
|
||||||
},
|
},
|
||||||
internal : { newTab : TreeStyleTabService.getTreePref('urlbar.loadSameDomainToNewChildTab') },
|
internal : { newTab : TreeStyleTabService.getTreePref('urlbar.loadSameDomainToNewChildTab') },
|
||||||
modifier : aTriggeringEvent && aTriggeringEvent.altKey,
|
modifier : $&,
|
||||||
invert : TreeStyleTabService.getTreePref('urlbar.invertDefaultBehavior')
|
invert : TreeStyleTabService.getTreePref('urlbar.invertDefaultBehavior')
|
||||||
})
|
})
|
||||||
]]></>
|
]]></>
|
||||||
@ -977,18 +977,16 @@ 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);
|
|
||||||
]]></>
|
]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -998,7 +996,7 @@ catch(e) {
|
|||||||
<><![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);
|
||||||
openUILink(]]></>
|
$&]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('nsContextMenu.prototype.viewBGImage = '+
|
eval('nsContextMenu.prototype.viewBGImage = '+
|
||||||
@ -1007,7 +1005,7 @@ catch(e) {
|
|||||||
<><![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);
|
||||||
openUILink(]]></>
|
$&]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
eval('nsContextMenu.prototype.addDictionaries = '+
|
eval('nsContextMenu.prototype.addDictionaries = '+
|
||||||
@ -1016,7 +1014,7 @@ catch(e) {
|
|||||||
<><![CDATA[
|
<><![CDATA[
|
||||||
if (where.indexOf('tab') == 0)
|
if (where.indexOf('tab') == 0)
|
||||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||||
openUILinkIn(]]></>
|
$&]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1026,10 +1024,10 @@ catch(e) {
|
|||||||
if (funcs[i] in window && /^function handleLinkClick/.test(window[funcs[i]].toString()))
|
if (funcs[i] in window && /^function handleLinkClick/.test(window[funcs[i]].toString()))
|
||||||
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);
|
||||||
openNewTabWith(]]></>
|
$1]]></>
|
||||||
).replace(
|
).replace(
|
||||||
/(event.ctrlKey|event.metaKey)/,
|
/(event.ctrlKey|event.metaKey)/,
|
||||||
<><![CDATA[
|
<><![CDATA[
|
||||||
@ -1111,11 +1109,11 @@ catch(e) {
|
|||||||
/^function (gotoHistoryIndex|BrowserForward|BrowserBack)/.test(window[funcs[i]].toString()))
|
/^function (gotoHistoryIndex|BrowserForward|BrowserBack)/.test(window[funcs[i]].toString()))
|
||||||
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();
|
||||||
openUILinkIn(]]></>
|
$1]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1130,7 +1128,7 @@ catch(e) {
|
|||||||
'gBrowser.loadTabs(',
|
'gBrowser.loadTabs(',
|
||||||
<><![CDATA[
|
<><![CDATA[
|
||||||
TreeStyleTabService.readyToOpenNewTabGroup(gBrowser);
|
TreeStyleTabService.readyToOpenNewTabGroup(gBrowser);
|
||||||
gBrowser.loadTabs(]]></>
|
$&]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -1141,14 +1139,13 @@ catch(e) {
|
|||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
switch(aWhere)
|
$1]]></>
|
||||||
]]></>
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
window.QueryInterface(Components.interfaces.nsIDOMChromeWindow).browserDOMWindow = null;
|
window.QueryInterface(Components.interfaces.nsIDOMChromeWindow).browserDOMWindow = null;
|
||||||
@ -1160,7 +1157,7 @@ catch(e) {
|
|||||||
<><![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);
|
||||||
openUILink(]]></>
|
$&]]></>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user