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