with Tab Mix Plus, I cannot drop multiple tabs (fix for https://github.com/piroor/multipletab/issues/closed#issue/2 )

This commit is contained in:
SHIMODA Hiroshi 2010-12-15 12:05:29 +09:00
parent 99dba23763
commit 64c7fb8b65
2 changed files with 21 additions and 10 deletions

@ -1 +1 @@
Subproject commit 7adc0c6e3866bb535ffd9f851afd8d0b7224eb9d
Subproject commit 6851e29a6e68c51bd6fc84e6e2a1208116d9fed5

View File

@ -13,7 +13,7 @@
http://github.com/piroor/fxaddonlibs/blob/master/tabsDragUtils.js
*/
(function() {
const currentRevision = 4;
const currentRevision = 5;
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
@ -40,6 +40,9 @@
},
_delayedInit : function TDU_delayedInit()
{
window.removeEventListener('load', arguments.callee, false);
delete tabsDragUtils._delayedInit;
if (
'PlacesControllerDragHelper' in window &&
'onDrop' in PlacesControllerDragHelper &&
@ -64,7 +67,10 @@
)
);
}
delete tabsDragUtils._delayedInit;
// for Tab Mix Plus
if ('TabDNDObserver' in window)
tabsDragUtils.initTabDNDObserver(TabDNDObserver);
},
destroy : function TDU_destroy()
{
@ -77,19 +83,24 @@
var tabDNDObserver = (aTabBrowser.tabContainer && aTabBrowser.tabContainer.tabbrowser == aTabBrowser) ?
aTabBrowser.tabContainer : // Firefox 4.0 or later
aTabBrowser ; // Firefox 3.5 - 3.6
if ('_setEffectAllowedForDataTransfer' in tabDNDObserver &&
tabDNDObserver._setEffectAllowedForDataTransfer.toSource().indexOf('tabDragUtils') < 0) {
eval('tabDNDObserver._setEffectAllowedForDataTransfer = '+
tabDNDObserver._setEffectAllowedForDataTransfer.toSource().replace(
this.initTabDNDObserver(tabDNDObserver);
},
destroyTabBrowser : function TDU_destroyTabBrowser(aTabBrowser)
{
},
initTabDNDObserver : function TDU_initTabDNDObserver(aObserver)
{
if ('_setEffectAllowedForDataTransfer' in aObserver &&
aObserver._setEffectAllowedForDataTransfer.toSource().indexOf('tabDragUtils') < 0) {
eval('aObserver._setEffectAllowedForDataTransfer = '+
aObserver._setEffectAllowedForDataTransfer.toSource().replace(
'dt.mozItemCount > 1',
'$& && !window["piro.sakura.ne.jp"].tabsDragUtils.isTabsDragging(arguments[0])'
)
);
}
},
destroyTabBrowser : function TDU_destroyTabBrowser(aTabBrowser)
{
},
startTabsDrag : function TDU_startTabsDrag(aEvent, aTabs)
{