Bug 206080 Server password pop-up dialog text box isn't masked!

r=rginda@hacksrus.com


git-svn-id: svn://10.0.0.236/trunk@149513 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
silver%warwickcompsoc.co.uk
2003-11-18 22:39:26 +00:00
parent 33c4fd5610
commit 4c3da9bd11
2 changed files with 19 additions and 2 deletions

View File

@@ -899,3 +899,20 @@ function prompt(msg, initial, parent, title)
return rv.value
}
function promptPassword(msg, initial, parent, title)
{
var PROMPT_CTRID = "@mozilla.org/embedcomp/prompt-service;1";
var nsIPromptService = Components.interfaces.nsIPromptService;
var ps = Components.classes[PROMPT_CTRID].createInstance(nsIPromptService);
if (!parent)
parent = window;
if (!title)
title = MSG_PROMPT;
rv = { value: initial };
if (!ps.promptPassword (parent, title, msg, rv, null, {value: null}))
return null;
return rv.value
}

View File

@@ -1313,7 +1313,7 @@ function gotoIRCURL (url)
if (url.pass)
pass = url.pass;
else
pass = window.prompt(getMsg(MSG_URL_PASSWORD, url.spec));
pass = window.promptPassword(getMsg(MSG_URL_PASSWORD, url.spec));
}
if (url.isserver)
@@ -1395,7 +1395,7 @@ function gotoIRCURL (url)
if (url.key)
key = url.key;
else
key = window.prompt(getMsg(MSG_URL_KEY, url.spec));
key = window.promptPassword(getMsg(MSG_URL_KEY, url.spec));
}
var charset;