From 94e1b0d89d91012e66558dfef34b5c2cb8d8b6e9 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Thu, 28 Jan 2016 21:41:09 +0900 Subject: [PATCH] Open new tabs from histories as orphan tabs --- modules/bookmark.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/bookmark.js b/modules/bookmark.js index 6ccafd2f..65b07c7e 100644 --- a/modules/bookmark.js +++ b/modules/bookmark.js @@ -487,3 +487,13 @@ PlacesUIUtils.openURINodesInTabs = function(aNode, ...aArgs) { delete this.__treestyletab__folderName; } }; + +PlacesUIUtils.__treestyletab__openNodeWithEvent = PlacesUIUtils.openNodeWithEvent; +PlacesUIUtils.openNodeWithEvent = function(aNode, aEvent, aView, ...aArgs) { + var window = aView.ownerWindow; + if (!window.gBrowser) + window = PlacesUIUtils._getTopBrowserWin(); + if (window && window.gBrowser) + window.gBrowser.treeStyleTab.readyToOpenOrphanTabNow(); + return PlacesUIUtils.__treestyletab__openNodeWithEvent.apply(this, [aNode, aEvent, aView].concat(aArgs)); +};