From 3d29dbb4d662ab9169ab70616d9bf1837fb0f409 Mon Sep 17 00:00:00 2001 From: "sgehani%netscape.com" Date: Sun, 17 Feb 2002 00:26:54 +0000 Subject: [PATCH] Make context menu search item open results in a new window. b=122162; r=morse; sr=dveditz --- xpfe/browser/resources/content/navigator.js | 7 +++++-- .../resources/content/contentAreaContextOverlay.xul | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xpfe/browser/resources/content/navigator.js b/xpfe/browser/resources/content/navigator.js index 2dd259a4f6a..b2dc46a5907 100644 --- a/xpfe/browser/resources/content/navigator.js +++ b/xpfe/browser/resources/content/navigator.js @@ -675,7 +675,7 @@ function getSearchUrl(attr) } -function OpenSearch(tabName, forceDialogFlag, searchStr) +function OpenSearch(tabName, forceDialogFlag, searchStr, newWindowFlag) { //This function needs to be split up someday. @@ -754,7 +754,10 @@ function OpenSearch(tabName, forceDialogFlag, searchStr) } catch (ex) { } - loadURI(defaultSearchURL); + if (!newWindowFlag) + loadURI(defaultSearchURL); + else + window.open(defaultSearchURL, "_blank"); } } } diff --git a/xpfe/communicator/resources/content/contentAreaContextOverlay.xul b/xpfe/communicator/resources/content/contentAreaContextOverlay.xul index b15ba4acb03..d7b9282303d 100644 --- a/xpfe/communicator/resources/content/contentAreaContextOverlay.xul +++ b/xpfe/communicator/resources/content/contentAreaContextOverlay.xul @@ -122,7 +122,7 @@ gContextMenu.linkText(), undefined, true);"/> + oncommand="OpenSearch('internet', false, gContextMenu.searchSelected(), true);"/>