Permalink
Browse files

Open tabs as children, from the "search by" in the context menu. (#655)

It worked in old versions, but killed by changes of Firefox itself.
  • Loading branch information...
piroor committed Feb 8, 2014
1 parent c68d85c commit 2f51f152652847caaefb091f8d5177b3358ad401
Showing with 17 additions and 8 deletions.
  1. +17 −8 content/treestyletab/windowHelper.js
@@ -159,14 +159,23 @@ var TreeStyleTabWindowHelper = {
)
);
- if ('BrowserSearch' in window &&
- 'loadSearch' in BrowserSearch) {
- eval('BrowserSearch.loadSearch = '+
- BrowserSearch.loadSearch.toSource().replace(
- 'openLinkIn(',
- 'TreeStyleTabService.onBeforeBrowserSearch(arguments[0], useNewTab); $&'
- )
- );
+ if ('BrowserSearch' in window) {
+ if ('_loadSearch' in BrowserSearch) {
+ eval('BrowserSearch._loadSearch = '+
+ BrowserSearch._loadSearch.toSource().replace(
+ 'openLinkIn(',
+ 'TreeStyleTabService.onBeforeBrowserSearch(arguments[0], useNewTab); $&'
+ )
+ );
+ }
+ else if ('loadSearch' in BrowserSearch) { // Firefox 24 and olders
+ eval('BrowserSearch.loadSearch = '+
+ BrowserSearch.loadSearch.toSource().replace(
+ 'openLinkIn(',
+ 'TreeStyleTabService.onBeforeBrowserSearch(arguments[0], useNewTab); $&'
+ )
+ );
+ }
}
let (functions = [

0 comments on commit 2f51f15

Please sign in to comment.