hack for BrowserSearch.loadSearch() didn't work on Firefox 4 or later.

This commit is contained in:
SHIMODA Hiroshi 2011-08-03 10:05:26 +09:00
parent 5e26c9de1e
commit 7ced731636

View File

@ -187,11 +187,19 @@ var TreeStyleTabWindowHelper = {
'loadSearch' in BrowserSearch) {
eval('BrowserSearch.loadSearch = '+
BrowserSearch.loadSearch.toSource().replace(
// for old Firefox 3.6 or olders
'if (useNewTab) {',
<![CDATA[$&
if (TreeStyleTabService.shouldOpenSearchResultAsChild(arguments[0]))
TreeStyleTabService.readyToOpenChildTab();
]]>
).replace(
// for old Firefox 4 or later
'openLinkIn(',
<![CDATA[
if (useNewTab && TreeStyleTabService.shouldOpenSearchResultAsChild(arguments[0]))
TreeStyleTabService.readyToOpenChildTab();
$&]]>
)
);
}