with Locationbar2 ( https://addons.mozilla.org/firefox/addon/locationbar²/ ), new tabs from path segments should be opened as child tabs of the current tab
This commit is contained in:
parent
7c71359f2d
commit
c21df996cb
@ -1041,6 +1041,57 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function TSTService_override
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Locationbar2
|
||||||
|
// https://addons.mozilla.org/firefox/addon/locationbar²/
|
||||||
|
if ('lb2_alternateStyles' in window &&
|
||||||
|
this.getTreePref('compatibility.Locationbar2')) {
|
||||||
|
let sv = this;
|
||||||
|
let listening = false;
|
||||||
|
let listener = function(aEvent) {
|
||||||
|
switch (aEvent.type)
|
||||||
|
{
|
||||||
|
case 'unload':
|
||||||
|
window.removeEventListener('unload', listener, false);
|
||||||
|
window.removeEventListener(sv.kEVENT_TYPE_BEFORE_TOOLBAR_CUSTOMIZATION, listener, false);
|
||||||
|
window.removeEventListener(sv.kEVENT_TYPE_AFTER_TOOLBAR_CUSTOMIZATION, listener, false);
|
||||||
|
case sv.kEVENT_TYPE_BEFORE_TOOLBAR_CUSTOMIZATION:
|
||||||
|
if (gURLBar && listening)
|
||||||
|
gURLBar.removeEventListener('click', listener, true);
|
||||||
|
listening = false;
|
||||||
|
return;
|
||||||
|
|
||||||
|
case sv.kEVENT_TYPE_AFTER_TOOLBAR_CUSTOMIZATION:
|
||||||
|
if (gURLBar && !listening) {
|
||||||
|
gURLBar.addEventListener('click', listener, true);
|
||||||
|
listening = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case 'click':
|
||||||
|
if (sv.evaluateXPath(
|
||||||
|
'ancestor-or-self::*['
|
||||||
|
+'contains(concat(" ", normalize-space(@class), " "), " textbox-presentation-segment ")'
|
||||||
|
+']',
|
||||||
|
aEvent.originalTarget,
|
||||||
|
Ci.nsIDOMXPathResult.BOOLEAN_TYPE
|
||||||
|
).booleanValue) {
|
||||||
|
sv.readyToOpenChildTab(gBrowser.selectedTab);
|
||||||
|
sv.Deferred.next(function() {
|
||||||
|
// clear with delay, because this action can be ignored by othere reasons.
|
||||||
|
sv.stopToOpenChildTab(gBrowser.selectedTab);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
window.addEventListener('unload', listener, false);
|
||||||
|
window.addEventListener(this.kEVENT_TYPE_BEFORE_TOOLBAR_CUSTOMIZATION, listener, false);
|
||||||
|
window.addEventListener(this.kEVENT_TYPE_AFTER_TOOLBAR_CUSTOMIZATION, listener, false);
|
||||||
|
if (gURLBar && !listening) {
|
||||||
|
gURLBar.addEventListener('click', listener, true);
|
||||||
|
listening = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
window.setTimeout(function(aSelf) {
|
window.setTimeout(function(aSelf) {
|
||||||
aSelf.overrideExtensionsDelayed();
|
aSelf.overrideExtensionsDelayed();
|
||||||
|
@ -562,44 +562,45 @@ pref("extensions.treestyletab.createSubtree.underParent", true);
|
|||||||
* In other words, add-on authros can disable TST's dirty hack if it is
|
* In other words, add-on authros can disable TST's dirty hack if it is
|
||||||
* obsolete.
|
* obsolete.
|
||||||
*/
|
*/
|
||||||
pref("extensions.treestyletab.compatibility.Highlander", true);
|
pref("extensions.treestyletab.compatibility.AgingTabs", true);
|
||||||
pref("extensions.treestyletab.compatibility.PermaTabs", true);
|
pref("extensions.treestyletab.compatibility.Autohide", true);
|
||||||
pref("extensions.treestyletab.compatibility.TMP", true); // Tab Mix Plus
|
|
||||||
pref("extensions.treestyletab.compatibility.SessionManager", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.FullerScreen", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.TooManyTabs", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.DragNDropToolbars", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.OptimozTweaks", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.Tabberwocky", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.SelectionLinks", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.SuperDragAndGo", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.DragDeGo", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.ColorfulTabs", true);
|
pref("extensions.treestyletab.compatibility.ColorfulTabs", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.DomainTab", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.DragDeGo", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.DragNDropToolbars", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.FirefoxSync", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.FireGestures", true);
|
||||||
pref("extensions.treestyletab.compatibility.FLST", true);
|
pref("extensions.treestyletab.compatibility.FLST", true);
|
||||||
pref("extensions.treestyletab.compatibility.FocusLastSelectedTab", true);
|
pref("extensions.treestyletab.compatibility.FocusLastSelectedTab", true);
|
||||||
pref("extensions.treestyletab.compatibility.LastTab", true);
|
pref("extensions.treestyletab.compatibility.FullerScreen", true);
|
||||||
pref("extensions.treestyletab.compatibility.FireGestures", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.MouseGesturesRedox", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.Greasemonkey", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.SBMCounter", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.AgingTabs", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.SnapLinks", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.MouselessBrowsing", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.Linky", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.QuickDrag", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.Autohide", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.GoogleToolbar.Sidewiki", true);
|
pref("extensions.treestyletab.compatibility.GoogleToolbar.Sidewiki", true);
|
||||||
pref("extensions.treestyletab.compatibility.SmoothlyCloseTabs", true);
|
pref("extensions.treestyletab.compatibility.Greasemonkey", true);
|
||||||
pref("extensions.treestyletab.compatibility.STM", true); // Super Tab Mode
|
pref("extensions.treestyletab.compatibility.Highlander", true);
|
||||||
pref("extensions.treestyletab.compatibility.STM.warnForNewTabPosition", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.TabUtilities", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.RemoveNewTabButton", true);
|
|
||||||
pref("extensions.treestyletab.compatibility.IETabPlus", true);
|
pref("extensions.treestyletab.compatibility.IETabPlus", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.LastTab", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.Linky", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.Locationbar2", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.MouseGesturesRedox", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.MouselessBrowsing", true);
|
||||||
pref("extensions.treestyletab.compatibility.MultiLinks", true);
|
pref("extensions.treestyletab.compatibility.MultiLinks", true);
|
||||||
pref("extensions.treestyletab.compatibility.DomainTab", true);
|
pref("extensions.treestyletab.compatibility.OptimozTweaks", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.PermaTabs", true);
|
||||||
pref("extensions.treestyletab.compatibility.PersonalTitlebar", true);
|
pref("extensions.treestyletab.compatibility.PersonalTitlebar", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.QuickDrag", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.RemoveNewTabButton", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.SBMCounter", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.SelectionLinks", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.SessionManager", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.SmoothlyCloseTabs", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.SnapLinks", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.STM.warnForNewTabPosition", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.STM", true); // Super Tab Mode
|
||||||
|
pref("extensions.treestyletab.compatibility.SuperDragAndGo", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.Tabberwocky", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.TabUtilities", true);
|
||||||
|
pref("extensions.treestyletab.compatibility.TMP", true); // Tab Mix Plus
|
||||||
|
pref("extensions.treestyletab.compatibility.TooManyTabs", true);
|
||||||
pref("extensions.treestyletab.compatibility.TotalToolbar", true);
|
pref("extensions.treestyletab.compatibility.TotalToolbar", true);
|
||||||
pref("extensions.treestyletab.compatibility.FirefoxSync", true);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The internal version of TST preferences. Don't change this by hand, because
|
* The internal version of TST preferences. Don't change this by hand, because
|
||||||
|
Loading…
Reference in New Issue
Block a user