From abc92ba06bb84d544a0d1deb065eb608cac8190e Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Mon, 7 Jan 2008 22:44:06 +0000 Subject: Redirector 1.5 git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@102 119bf307-c92d-0410-89bd-8f53e6181181 --- chrome/content/redirector.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'chrome/content/redirector.js') diff --git a/chrome/content/redirector.js b/chrome/content/redirector.js index 622f170..62966d6 100644 --- a/chrome/content/redirector.js +++ b/chrome/content/redirector.js @@ -266,14 +266,18 @@ var Redirector = { }, openHelp : function() { + var windowName = "redirectorHelp"; var windowsMediator = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator); var win; var iter = windowsMediator.getEnumerator(null); while (iter.hasMoreElements()) { win = iter.getNext(); - alert(win.name); + if (win.name == windowName) { + win.focus(); + return; + } } - //window.openDialog("chrome://redirector/content/help.html", windowName, "chrome,dialog,resizable=yes,location=0,toolbar=0,status=0,width=800px,height=600px,centerscreen", this); + window.openDialog("chrome://redirector/content/help.html", windowName, "chrome,dialog,resizable=yes,location=0,toolbar=0,status=0,width=800px,height=600px,centerscreen", this); }, -- cgit v1.2.3-70-g09d2