Handle duplicated tabs totally
This commit is contained in:
parent
51de133b0d
commit
d7caa5ac59
@ -272,12 +272,6 @@ var TreeStyleTabWindowHelper = {
|
|||||||
};
|
};
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
window.__treestyletab__duplicateTabIn = window.duplicateTabIn;
|
|
||||||
window.duplicateTabIn = function(aTab, where, delta) {
|
|
||||||
gBrowser.treeStyleTab.onBeforeTabDuplicate(aTab, where, delta);
|
|
||||||
return window.__treestyletab__duplicateTabIn.call(this, aTab, where, delta);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.__treestyletab__BrowserGoHome = window.BrowserGoHome;
|
window.__treestyletab__BrowserGoHome = window.BrowserGoHome;
|
||||||
window.BrowserGoHome = function(aEvent) {
|
window.BrowserGoHome = function(aEvent) {
|
||||||
aEvent = TreeStyleTabService.onBeforeGoHome(aEvent, gBrowser);
|
aEvent = TreeStyleTabService.onBeforeGoHome(aEvent, gBrowser);
|
||||||
|
@ -799,4 +799,11 @@ prefs.addPrefListener(TreeStyleTabUtils);
|
|||||||
TabAttributesInternal._skipAttrs.add(name);
|
TabAttributesInternal._skipAttrs.add(name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let { SessionStore } = Cu.import('resource:///modules/sessionstore/SessionStore.jsm', {});
|
||||||
|
SessionStore.__treestyletab__duplicateTab = SessionStore.duplicateTab;
|
||||||
|
SessionStore.duplicateTab = function(aWindow, aTab, aDelta = 0) {
|
||||||
|
aWindow.gBrowser.treeStyleTab.onBeforeTabDuplicate(aWindow, aTab, aDelta);
|
||||||
|
return this.__treestyletab__duplicateTab.call(this, aWindow, aTab, aDelta);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1365,11 +1365,8 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
|
|||||||
},
|
},
|
||||||
_clickEventOnNewTabButtonHandled : false,
|
_clickEventOnNewTabButtonHandled : false,
|
||||||
|
|
||||||
onBeforeTabDuplicate : function TSTWindow_onBeforeTabDuplicate(aTab, aWhere, aDelta)
|
onBeforeTabDuplicate : function TSTWindow_onBeforeTabDuplicate(aWindow, aTab, aDelta)
|
||||||
{
|
{
|
||||||
if (aWhere && aWhere.indexOf('tab') != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var b = this.getTabBrowserFromChild(aTab) || this.browser;
|
var b = this.getTabBrowserFromChild(aTab) || this.browser;
|
||||||
var behaviorPref = !aDelta ? 'autoAttach.duplicateTabCommand' :
|
var behaviorPref = !aDelta ? 'autoAttach.duplicateTabCommand' :
|
||||||
aDelta < 0 ? 'autoAttach.duplicateTabCommand.back' :
|
aDelta < 0 ? 'autoAttach.duplicateTabCommand.back' :
|
||||||
|
Loading…
Reference in New Issue
Block a user