From 1b3248172a42cbffda7aa04ed08dbe8f9b73ae18 Mon Sep 17 00:00:00 2001 From: SHIMODA Hiroshi Date: Wed, 10 Aug 2011 14:28:20 +0900 Subject: [PATCH] update for Snap Links Plus 2.1 ( http://snaplinks.mozdev.org/ ) --- content/treestyletab/windowHelperHacks.js | 28 +++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/content/treestyletab/windowHelperHacks.js b/content/treestyletab/windowHelperHacks.js index 65303338..a0c63c5a 100644 --- a/content/treestyletab/windowHelperHacks.js +++ b/content/treestyletab/windowHelperHacks.js @@ -706,15 +706,25 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove // https://addons.mozilla.org/firefox/addon/4336 // Snap Links Plus // http://snaplinks.mozdev.org/ - if ('executeAction' in window && - 'openTabs' in window && - sv.getTreePref('compatibility.SnapLinks')) { - eval('window.openTabs = '+ - window.openTabs.toSource().replace( - /((sContent|gBrowser|getBrowser\(\))\.addTab)/, - 'TreeStyleTabService.readyToOpenChildTab($2); $1' - ) - ); + if (sv.getTreePref('compatibility.SnapLinks')) { + if ('executeAction' in window && + 'openTabs' in window) { + eval('window.openTabs = '+ + window.openTabs.toSource().replace( + /((sContent|gBrowser|getBrowser\(\))\.addTab)/, + 'TreeStyleTabService.readyToOpenChildTab($2); $1' + ) + ); + } + if ('SnapLinks' in window && + 'OpenTabs' in SnapLinks) { + eval('SnapLinks.OpenTabs = '+ + SnapLinks.OpenTabs.toSource().replace( + /((sContent|gBrowser|getBrowser\(\))\.addTab)/, + 'TreeStyleTabService.readyToOpenChildTab($2); $1' + ) + ); + } } // Mouseless Browsing