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
|
||||
eval('MultipleTabService.showHideMenuItems = '+
|
||||
MultipleTabService.showHideMenuItems.toSource().replace(
|
||||
/var separators = /,
|
||||
'var separators = ',
|
||||
<><![CDATA[
|
||||
if (aPopup.id == 'multipletab-selection-menu') {
|
||||
TreeStyleTabService.showHideRemoveSubTreeMenuItem(document.getElementById(TreeStyleTabService.kMENUITEM_REMOVESUBTREE_SELECTION), MultipleTabService.getSelectedTabs());
|
||||
}
|
||||
var separators = ]]></>
|
||||
$&]]></>
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -100,51 +100,48 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
||||
eval('autoHIDE.EndFull = '+
|
||||
autoHIDE.EndFull.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
var appcontent = document.getElementById('appcontent');
|
||||
if (appcontent.__treestyletab__resized) {
|
||||
appcontent.__treestyletab__resized = false;
|
||||
appcontent.style.margin = 0;
|
||||
}
|
||||
window.setTimeout('gBrowser.treeStyleTab.checkTabsIndentOverflow();', 0);
|
||||
<><![CDATA[$&
|
||||
var appcontent = document.getElementById('appcontent');
|
||||
if (appcontent.__treestyletab__resized) {
|
||||
appcontent.__treestyletab__resized = false;
|
||||
appcontent.style.margin = 0;
|
||||
}
|
||||
window.setTimeout('gBrowser.treeStyleTab.checkTabsIndentOverflow();', 0);
|
||||
]]></>
|
||||
)
|
||||
);
|
||||
eval('autoHIDE.SetMenu = '+
|
||||
autoHIDE.SetMenu.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
if (arguments.length && arguments[0]) {
|
||||
var treeStyleTabSplitter = document.getAnonymousElementByAttribute(gBrowser, 'class', TreeStyleTabService.kSPLITTER);
|
||||
gBrowser.treeStyleTab.tabbarWidth = gBrowser.mStrip.boxObject.width +
|
||||
(treeStyleTabSplitter ? treeStyleTabSplitter.boxObject.width : 0 );
|
||||
}
|
||||
<><![CDATA[$&
|
||||
if (arguments.length && arguments[0]) {
|
||||
var treeStyleTabSplitter = document.getAnonymousElementByAttribute(gBrowser, 'class', TreeStyleTabService.kSPLITTER);
|
||||
gBrowser.treeStyleTab.tabbarWidth = gBrowser.mStrip.boxObject.width +
|
||||
(treeStyleTabSplitter ? treeStyleTabSplitter.boxObject.width : 0 );
|
||||
}
|
||||
]]></>
|
||||
)
|
||||
);
|
||||
eval('autoHIDE.MoveC = '+
|
||||
autoHIDE.MoveC.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);
|
||||
if (!arguments.length) {
|
||||
var appcontent = document.getElementById('appcontent');
|
||||
if (treeStyleTabPos == 'left' &&
|
||||
!appcontent.__treestyletab__resized) {
|
||||
appcontent.style.marginRight = '-'+gBrowser.treeStyleTab.tabbarWidth+'px';
|
||||
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;
|
||||
<><![CDATA[$&
|
||||
var treeStyleTabPos = gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION);
|
||||
if (!arguments.length) {
|
||||
var appcontent = document.getElementById('appcontent');
|
||||
if (treeStyleTabPos == 'left' &&
|
||||
!appcontent.__treestyletab__resized) {
|
||||
appcontent.style.marginRight = '-'+gBrowser.treeStyleTab.tabbarWidth+'px';
|
||||
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;
|
||||
}
|
||||
]]></>
|
||||
).replace(
|
||||
'.move(0, - this.delta)',
|
||||
@ -215,8 +212,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
||||
eval('window.TMP_TabDragGesture = '+
|
||||
window.TMP_TabDragGesture.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
<><![CDATA[$&
|
||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||
nsDragAndDrop.startDrag(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||
aEvent.stopPropagation();
|
||||
@ -228,8 +224,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
||||
eval('window.TMP_TabDragOver = '+
|
||||
window.TMP_TabDragOver.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
<><![CDATA[$&
|
||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||
nsDragAndDrop.dragOver(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||
aEvent.stopPropagation();
|
||||
@ -241,8 +236,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
||||
eval('window.TMP_TabDragDrop = '+
|
||||
window.TMP_TabDragDrop.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
<><![CDATA[$&
|
||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||
nsDragAndDrop.drop(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||
aEvent.stopPropagation();
|
||||
@ -254,8 +248,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
||||
eval('window.TMP_TabDragExit = '+
|
||||
window.TMP_TabDragExit.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
<><![CDATA[$&
|
||||
if (TreeStyleTabService.getPref('extensions.tabmix.tabBarMode', 1) != 2) {
|
||||
nsDragAndDrop.dragExit(aEvent, (gBrowser.getAttribute(TreeStyleTabService.kMODE) == 'vertical' ? gBrowser : TabDNDObserver ));
|
||||
aEvent.stopPropagation();
|
||||
|
@ -961,7 +961,7 @@ catch(e) {
|
||||
forceChild : TreeStyleTabService.getTreePref('urlbar.loadDifferentDomainToNewTab.asChild')
|
||||
},
|
||||
internal : { newTab : TreeStyleTabService.getTreePref('urlbar.loadSameDomainToNewChildTab') },
|
||||
modifier : aTriggeringEvent && aTriggeringEvent.altKey,
|
||||
modifier : $&,
|
||||
invert : TreeStyleTabService.getTreePref('urlbar.invertDefaultBehavior')
|
||||
})
|
||||
]]></>
|
||||
@ -977,18 +977,16 @@ catch(e) {
|
||||
eval('nsContextMenu.prototype.openLinkInTab = '+
|
||||
nsContextMenu.prototype.openLinkInTab.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||
<><![CDATA[$&
|
||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||
]]></>
|
||||
)
|
||||
);
|
||||
eval('nsContextMenu.prototype.openFrameInTab = '+
|
||||
nsContextMenu.prototype.openFrameInTab.toSource().replace(
|
||||
'{',
|
||||
<><![CDATA[
|
||||
{
|
||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||
<><![CDATA[$&
|
||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||
]]></>
|
||||
)
|
||||
);
|
||||
@ -998,7 +996,7 @@ catch(e) {
|
||||
<><![CDATA[
|
||||
if (String(whereToOpenLink(e, false, true)).indexOf('tab') == 0)
|
||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||
openUILink(]]></>
|
||||
$&]]></>
|
||||
)
|
||||
);
|
||||
eval('nsContextMenu.prototype.viewBGImage = '+
|
||||
@ -1007,7 +1005,7 @@ catch(e) {
|
||||
<><![CDATA[
|
||||
if (String(whereToOpenLink(e, false, true)).indexOf('tab') == 0)
|
||||
TreeStyleTabService.readyToOpenChildTab(this.target.ownerDocument.defaultView);
|
||||
openUILink(]]></>
|
||||
$&]]></>
|
||||
)
|
||||
);
|
||||
eval('nsContextMenu.prototype.addDictionaries = '+
|
||||
@ -1016,7 +1014,7 @@ catch(e) {
|
||||
<><![CDATA[
|
||||
if (where.indexOf('tab') == 0)
|
||||
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()))
|
||||
eval('window.'+funcs[i]+' = '+
|
||||
window[funcs[i]].toSource().replace(
|
||||
/openNewTabWith\(/g,
|
||||
/(openNewTabWith\()/g,
|
||||
<><![CDATA[
|
||||
if (!TreeStyleTabService.checkToOpenChildTab(event.target.ownerDocument.defaultView)) TreeStyleTabService.readyToOpenChildTab(event.target.ownerDocument.defaultView);
|
||||
openNewTabWith(]]></>
|
||||
$1]]></>
|
||||
).replace(
|
||||
/(event.ctrlKey|event.metaKey)/,
|
||||
<><![CDATA[
|
||||
@ -1111,11 +1109,11 @@ catch(e) {
|
||||
/^function (gotoHistoryIndex|BrowserForward|BrowserBack)/.test(window[funcs[i]].toString()))
|
||||
eval('window.'+funcs[i]+' = '+
|
||||
window[funcs[i]].toSource().replace(
|
||||
/openUILinkIn\(/g,
|
||||
/(openUILinkIn\()/g,
|
||||
<><![CDATA[
|
||||
if (where == 'tab' || where == 'tabshifted')
|
||||
TreeStyleTabService.readyToOpenChildTab();
|
||||
openUILinkIn(]]></>
|
||||
$1]]></>
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -1130,7 +1128,7 @@ catch(e) {
|
||||
'gBrowser.loadTabs(',
|
||||
<><![CDATA[
|
||||
TreeStyleTabService.readyToOpenNewTabGroup(gBrowser);
|
||||
gBrowser.loadTabs(]]></>
|
||||
$&]]></>
|
||||
)
|
||||
);
|
||||
};
|
||||
@ -1141,14 +1139,13 @@ catch(e) {
|
||||
|
||||
eval('nsBrowserAccess.prototype.openURI = '+
|
||||
nsBrowserAccess.prototype.openURI.toSource().replace(
|
||||
/switch\s*\(aWhere\)/,
|
||||
/(switch\s*\(aWhere\))/,
|
||||
<><![CDATA[
|
||||
if (aOpener &&
|
||||
aWhere == Components.interfaces.nsIBrowserDOMWindow.OPEN_NEWTAB) {
|
||||
TreeStyleTabService.readyToOpenChildTab(aOpener);
|
||||
}
|
||||
switch(aWhere)
|
||||
]]></>
|
||||
$1]]></>
|
||||
)
|
||||
);
|
||||
window.QueryInterface(Components.interfaces.nsIDOMChromeWindow).browserDOMWindow = null;
|
||||
@ -1160,7 +1157,7 @@ catch(e) {
|
||||
<><![CDATA[
|
||||
if (String(whereToOpenLink(event, false, true)).indexOf('tab') == 0)
|
||||
TreeStyleTabService.readyToOpenChildTab(gBrowser);
|
||||
openUILink(]]></>
|
||||
$&]]></>
|
||||
)
|
||||
);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user