From 594aba34c083fe6ce96f81a795f86803f20b8450 Mon Sep 17 00:00:00 2001 From: piro Date: Tue, 14 Sep 2010 06:56:55 +0000 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E3=82=BF=E3=83=96=E3=81=AE=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E3=80=8D=E3=81=AE=E3=83=9D=E3=83=83=E3=83=97=E3=82=A2?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=81=A7Tab=20Utilities=E3=81=AB=E3=82=88?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E6=8C=BF=E5=85=A5=E3=81=95=E3=82=8C=E3=81=9F?= =?UTF-8?q?=E9=A0=85=E7=9B=AE=E3=81=AE=E5=BD=B1=E9=9F=BF=E3=81=A7=E3=82=BF?= =?UTF-8?q?=E3=83=96=E3=81=AB=E5=AF=BE=E5=BF=9C=E3=81=99=E3=82=8B=E9=A0=85?= =?UTF-8?q?=E7=9B=AE=E3=81=8C=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7198 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index 81c05bcc..3adf07c6 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1306,16 +1306,17 @@ catch(e) { var items = Array.slice(aEvent.originalTarget.childNodes); var firstItemIndex = 0; - // ignore menu items inserted by Weave - if (items.some(function(aItem, aIndex) { - if ((aItem.getAttribute('anonid') || aItem.id) == 'sync-tabs-sep') { - firstItemIndex = aIndex + 1; - return true; - } - return false; - })) { - items = items.slice(firstItemIndex); - } + // ignore menu items inserted by Weave (Firefox Sync), Tab Utilities, and others. + items.forEach(function(aItem, aIndex) { + if ( + aItem.getAttribute('anonid') || + aItem.id || + aItem.hidden || + aItem.localName != 'menuitem' + ) + firstItemIndex = aIndex + 1; + }); + items = items.slice(firstItemIndex); var b = this.getTabBrowserFromChild(aEvent.originalTarget) || gBrowser; this.getTabsArray(b).forEach(function(aTab, aIndex) {