Better compatibility with [Tab Control](https://addons.mozilla.org/firefox/addon/tab-control) #636
This commit is contained in:
parent
7f3fdb1ab1
commit
c82e735bb0
@ -1353,6 +1353,32 @@ TreeStyleTabWindowHelper.overrideExtensionsDelayed = function TSTWH_overrideExte
|
||||
}
|
||||
}
|
||||
|
||||
// Tab Control
|
||||
// https://addons.mozilla.org/firefox/addon/tab-control/
|
||||
if (
|
||||
TreeStyleTabUtils.getTreePref('compatibility.TabControl') &&
|
||||
'gTabControl' in window
|
||||
) {
|
||||
let listener = {
|
||||
handleEvent : function(aEvent)
|
||||
{
|
||||
switch (aEvent.type)
|
||||
{
|
||||
case sv.kEVENT_TYPE_FOCUS_NEXT_TAB:
|
||||
if (TreeStyleTabUtils.prefs.getPref('tabcontrol.focusLeftOnClose'))
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
|
||||
case 'unload':
|
||||
document.removeEventListener(sv.kEVENT_TYPE_FOCUS_NEXT_TAB, this, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
document.addEventListener(sv.kEVENT_TYPE_FOCUS_NEXT_TAB, listener, false);
|
||||
document.addEventListener('unload', listener, false);
|
||||
}
|
||||
|
||||
// Firefox Sync (Weave)
|
||||
// http://www.mozilla.com/en-US/firefox/sync/
|
||||
if (
|
||||
|
@ -677,6 +677,7 @@ 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.TabControl", true);
|
||||
pref("extensions.treestyletab.compatibility.TabUtilities", true);
|
||||
pref("extensions.treestyletab.compatibility.TMP", true); // Tab Mix Plus
|
||||
pref("extensions.treestyletab.compatibility.TooManyTabs", true);
|
||||
|
@ -14,7 +14,7 @@
|
||||
* The Original Code is the Tree Style Tab.
|
||||
*
|
||||
* The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011-2013
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011-2014
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex@gmail.com>
|
||||
|
Loading…
Reference in New Issue
Block a user