From 864698e720ada575445b97e66123574d1c78f198 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Fri, 18 Mar 2016 16:27:39 +0900 Subject: [PATCH] Allow to disable new tab position control --- defaults/preferences/treestyletab.js | 6 ++++++ modules/browser.js | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 82920270..44887880 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -536,6 +536,12 @@ pref("extensions.treestyletab.autoAttach.goButton", 1); */ pref("extensions.treestyletab.autoAttach.fromCurrent", 1); +/** + * If true, TST controls position of a newly opened tab by self. + * You should turn this false if you want to use any other addon which controls new tab positions. + */ +pref("extensions.treestyletab.controlNewTabPosition", true); + /** * Focus targets for Ctrl-Tab/Ctrl-Shift-Tab. * 0 = Focus to both visible and collapsed tabs. (If a collapsed tab is diff --git a/modules/browser.js b/modules/browser.js index 12bba3f9..f1320484 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -3676,7 +3676,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { var b = this.mTabBrowser; var prevPosition = aEvent.detail; - if (tab.__treestyletab__isOpening && !this.isTabInternallyMoving(tab)) { + if (tab.__treestyletab__isOpening && + !this.isTabInternallyMoving(tab) && + utils.getTreePref('controlNewTabPosition')) { log('onTabMove for new child tab: move back '+tab._tPos+' => '+prevPosition); tab.__treestyletab__internallyTabMovingCount++; b.moveTabTo(tab, prevPosition);