[Pkg-mozext-commits] [tabmixplus] 47/123: Middle-clicking forward/backward history menu open new tab next to the current tab according to "Open duplicated tabs next to original" preference instead of "Open other tabs next to current one"
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 499caefd96b4d12fcc5af2ac9131adf383f4916a
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Aug 25 21:52:40 2014 +0300
Middle-clicking forward/backward history menu open new tab next to the current tab according to "Open duplicated tabs next to original" preference instead of "Open other tabs next to current one"
---
chrome/content/minit/tablib.js | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 0ceadbb..37586fc 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -444,22 +444,28 @@ var tablib = {
// we prevent sessionStore.duplicateTab from moving the tab
Tabmix.changeCode(window, "duplicateTabIn")._replace(
'switch (where)',
- ' if (where == "window") {' +
- ' if (Tabmix.getSingleWindowMode())' +
- ' where = "tab";' +
- ' }' +
- ' else if (Tabmix.prefs.getBoolPref("openDuplicateNext")) {' +
- ' let pos = newTab._tPos > aTab._tPos ? 1 : 0;' +
- ' gBrowser.moveTabTo(newTab, aTab._tPos + pos);' +
- ' }' +
+ ' if (where == "window") {\n' +
+ ' if (Tabmix.getSingleWindowMode())\n' +
+ ' where = "tab";\n' +
+ ' }\n' +
+ ' else {\n' +
+ ' let pref = Tabmix.isCallerInList("gotoHistoryIndex","BrowserForward","BrowserBack") ?\n' +
+ ' "openTabNext" : "openDuplicateNext";\n' +
+ ' if (Tabmix.prefs.getBoolPref(pref)) {\n' +
+ ' let pos = newTab._tPos > aTab._tPos ? 1 : 0;\n' +
+ ' gBrowser.moveTabTo(newTab, aTab._tPos + pos);\n' +
+ ' }\n' +
+ ' }\n' +
' $&'
)._replace(
'gBrowser.selectedTab = newTab;',
- 'if (!Tabmix.prefs.getBoolPref("loadDuplicateInBackground")) $&'
+ 'if (!Tabmix.prefs.getBoolPref("loadDuplicateInBackground"))\n' +
+ ' $&'
)._replace(
'case "tabshifted":',
- '$&\
- if (Tabmix.prefs.getBoolPref("loadDuplicateInBackground")) gBrowser.selectedTab = newTab;'
+ '$&\n' +
+ ' if (Tabmix.prefs.getBoolPref("loadDuplicateInBackground"))\n' +
+ ' gBrowser.selectedTab = newTab;'
).toCode();
Tabmix.changeCode(window, "BrowserCloseTabOrWindow")._replace(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list