From 01f22633217e9734aba5d643fd8bbf367d4d3d02 Mon Sep 17 00:00:00 2001 From: piro Date: Mon, 1 Mar 2010 12:02:37 +0000 Subject: [PATCH] =?UTF-8?q?3.7a2pre=E3=81=A7=E5=88=9D=E6=9C=9F=E5=8C=96?= =?UTF-8?q?=E3=81=AB=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE?= =?UTF-8?q?=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@6325 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 85 ++++++++++++++------- 1 file changed, 58 insertions(+), 27 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 7b3f4bbf..5cb53cbc 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -389,33 +389,64 @@ TreeStyleTabBrowser.prototype = { ) ); - eval('b._keyEventHandler.handleEvent = '+ - b._keyEventHandler.handleEvent.toSource().replace( - 'this.tabbrowser.moveTabOver(aEvent);', - - ).replace( - 'this.tabbrowser.moveTabForward();', - - ).replace( - 'this.tabbrowser.moveTabBackward();', - - ) - ); + if ('' in b) { // Firefox 3.7- + eval('b._handleKeyEvent = '+ + b._handleKeyEvent.toSource().replace( + 'this.moveTabOver(aEvent);', + + ).replace( + 'this.moveTabForward();', + + ).replace( + 'this.moveTabBackward();', + + ) + ); + } + else if ('_keyEventHandler' in b) { // -Firefox 3.6 + eval('b._keyEventHandler.handleEvent = '+ + _keyEventHandler.handleEvent.toSource().replace( + 'this.tabbrowser.moveTabOver(aEvent);', + + ).replace( + 'this.tabbrowser.moveTabForward();', + + ).replace( + 'this.tabbrowser.moveTabBackward();', + + ) + ); + } eval('b.loadTabs = '+ b.loadTabs.toSource().replace(