[Pkg-mozext-commits] [tabmixplus] 30/147: Cannot drag tabs with Tab Mix Plus AND Multiple Tab Handler

David Prévot taffit at moszumanska.debian.org
Sat Aug 5 15:27:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 7a9230e8cb796234c10f5ad9bc43a395a9b3c4bc
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Nov 13 22:19:42 2016 +0200

    Cannot drag tabs with Tab Mix Plus AND Multiple Tab Handler
---
 chrome/content/minit/minit.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index efca55b..5d4f028 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -29,6 +29,10 @@ var TMP_tabDNDObserver = {
     }
 
     tabBar.moveTabOnDragging = Tabmix.prefs.getBoolPref("moveTabOnDragging");
+
+    // https://addons.mozilla.org/en-US/firefox/addon/multiple-tab-handler/
+    const tabsDragUtils = "piro.sakura.ne.jp" in window &&
+      "tabsDragUtils" in window["piro.sakura.ne.jp"];
     // Determine what tab we're dragging over.
     // * In tabmix tabs can have different width
     // * Point of reference is the start of the dragged tab when
@@ -47,12 +51,13 @@ var TMP_tabDNDObserver = {
     )._replace(
       'draggedTab._dragData.animLastScreenX = screenX;',
       'let draggingRight = screenX > draggedTab._dragData.animLastScreenX;\n          ' +
-      '$&', {check: Tabmix.isVersion(520)}
+      '$&', {check: Tabmix.isVersion(520) && !tabsDragUtils}
     )._replace(
       'let tabCenter = tabScreenX + translateX + tabWidth / 2;',
       'let tabCenter = tabScreenX + translateX + draggingRight * tabWidth;'
     )._replace(
-      /let screenX = boxObject.*;/,
+      tabsDragUtils ? /let screenX = boxObject\[TDUContext.*;/ :
+                      /let screenX = boxObject.*;/,
       '$&\n            ' +
       'let halfWidth = boxObject.width / 2;\n            ' +
       'screenX += draggingRight * halfWidth;'

-- 
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