зеркало из https://github.com/mozilla/pjs.git
Bug 206080 Server password pop-up dialog text box isn't masked!
r=rginda@hacksrus.com
This commit is contained in:
Родитель
8a4573f504
Коммит
aa05a85eae
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче