From 81ebf0bcf804e3eedbb9bec92db435c2698fe1f4 Mon Sep 17 00:00:00 2001 From: piro Date: Tue, 28 Apr 2009 04:55:59 +0000 Subject: [PATCH] =?UTF-8?q?Tab=20Mix=20Plus=200.3.7.3=E3=81=A8=E3=81=AE?= =?UTF-8?q?=E7=B5=84=E3=81=BF=E5=90=88=E3=82=8F=E3=81=9B=E3=81=A7=E3=81=BE?= =?UTF-8?q?=E3=82=8B=E3=81=A7=E5=8B=95=E3=81=8B=E3=81=AA=E3=81=8F=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E5=95=8F=E9=A1=8C=E3=81=AB?= =?UTF-8?q?=E6=9A=AB=E5=AE=9A=E5=AF=BE=E5=87=A6?= 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@4212 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 10 +++++----- content/treestyletab/treestyletabbrowser.js | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index bc47cdae..4d37a493 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1375,7 +1375,7 @@ catch(e) { window.BrowserLoadURL ]]>).forEach(function(aFunc) { var source = this._getFunctionSource(aFunc); - if (!source || !/^function BrowserLoadURL/.test(source)) + if (!source || !/^\(?function BrowserLoadURL/.test(source)) return; eval(aFunc+' = '+source.replace( 'aTriggeringEvent && aTriggeringEvent.altKey', @@ -1437,7 +1437,7 @@ catch(e) { window.handleLinkClick ]]>).some(function(aFunc) { var source = this._getFunctionSource(aFunc); - if (!source || !/^function handleLinkClick/.test(source)) + if (!source || !/^\(?function handleLinkClick/.test(source)) return false; eval(aFunc+' = '+source.replace( /(openNewTabWith\()/g, @@ -1495,7 +1495,7 @@ catch(e) { window.contentAreaClick ]]>).forEach(function(aFunc) { var source = this._getFunctionSource(aFunc); - if (!source || !/^function contentAreaClick/.test(source)) + if (!source || !/^\(?function contentAreaClick/.test(source)) return; eval(aFunc+' = '+source.replace( /((openWebPanel\([^\;]+\);|PlacesUIUtils.showMinimalAddBookmarkUI\([^;]+\);)event.preventDefault\(\);return false;\})/, @@ -1532,7 +1532,7 @@ catch(e) { window.BrowserBack ]]>).forEach(function(aFunc) { var source = this._getFunctionSource(aFunc); - if (!source || !/^function (gotoHistoryIndex|BrowserForward|BrowserBack)/.test(source)) + if (!source || !/^\(?function (gotoHistoryIndex|BrowserForward|BrowserBack)/.test(source)) return; eval(aFunc+' = '+source.replace( /(openUILinkIn\()/g, @@ -1549,7 +1549,7 @@ catch(e) { window.BrowserGoHome ]]>).forEach(function(aFunc) { var source = this._getFunctionSource(aFunc); - if (!source || !/^function (BrowserHomeClick|BrowserGoHome)/.test(source)) + if (!source || !/^\(?function (BrowserHomeClick|BrowserGoHome)/.test(source)) return; eval(aFunc+' = '+source.replace( 'gBrowser.loadTabs(', diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 83dfb390..7bcba6da 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -93,7 +93,7 @@ TreeStyleTabBrowser.prototype = { getTabClosebox : function(aTab) { - var close = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-close-button tabs-closebutton always-right') || // Tab Mix Plus + var close = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-close-button always-right') || // Tab Mix Plus document.getAnonymousElementByAttribute(aTab, 'class', 'tab-close-button'); return close; }, @@ -788,6 +788,7 @@ TreeStyleTabBrowser.prototype = { scrollInnerBox.removeAttribute('flex'); if (scrollFrame) { // Tab Mix Plus + document.getAnonymousNodes(scrollFrame)[0].removeAttribute('flex'); scrollFrame.parentNode.orient = scrollFrame.orient = 'vertical'; newTabBox.orient = 'horizontal'; @@ -863,6 +864,7 @@ TreeStyleTabBrowser.prototype = { scrollInnerBox.setAttribute('flex', 1); if (scrollFrame) { // Tab Mix Plus + document.getAnonymousNodes(scrollFrame)[0].setAttribute('flex', 1); scrollFrame.parentNode.orient = scrollFrame.orient = 'horizontal'; newTabBox.orient = 'vertical'; @@ -1866,7 +1868,6 @@ TreeStyleTabBrowser.prototype = { onTabbarOverflow : function(aEvent) { - var box = aEvent.currentTarget; var tabs = this.mTabBrowser.mTabContainer; var horizontal = tabs.orient == 'horizontal'; if (horizontal) return; @@ -1874,7 +1875,7 @@ TreeStyleTabBrowser.prototype = { if (aEvent.detail == 1) return; if (aEvent.type == 'overflow') { tabs.setAttribute('overflow', 'true'); - box.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem); + this.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem); } else { tabs.removeAttribute('overflow');