From 0226cb6655cdf0948be1e91d0876925c0b7cb72c Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Sun, 10 May 2009 05:20:55 +0000 Subject: SVN keywords on all source files git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@210 119bf307-c92d-0410-89bd-8f53e6181181 --- chrome/content/redirectList.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'chrome/content/redirectList.js') diff --git a/chrome/content/redirectList.js b/chrome/content/redirectList.js index c50583b..cd8c550 100644 --- a/chrome/content/redirectList.js +++ b/chrome/content/redirectList.js @@ -1,5 +1,8 @@ +//// $Id$ var Redirector = Components.classes["@einaregilsson.com/redirector;1"].getService(Components.interfaces.nsISupports).wrappedJSObject; +const Cc = Components.classes; +const Ci = Components.interfaces; function $(id) { return document.getElementById(id); @@ -45,6 +48,21 @@ var RedirectList = { } }, + 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(); + 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); + }, + close : function() { window.close(); }, -- cgit v1.2.3-70-g09d2