Firefox extension: prompt only when user enters a password.

This commit is contained in:
Jim Norman 2006-05-25 15:42:34 +00:00
parent 081799ea65
commit 966f1841a0

View File

@ -27,7 +27,7 @@ function logMessage(message)
function websso()
{
logMessage("PAGE LOADED");
//logMessage("PAGE LOADED");
var url = window._content.location.host;
var enabledsite = "no";
var ssosite = "no";
@ -44,14 +44,13 @@ function websso()
var para=window._content.document.getElementsByTagName("input");
for (var j = 0; !(j >= para.length) ; j++)
{
if((para.item(j).type == "password"))
{
ssosite = "yes";
logMessage("Password field");
logMessage(para.item(j).name);
logMessage(para.item(j).name);
}
}
@ -218,9 +217,17 @@ function promptuser()
{
if((ele.item(i).type == "password"))
{
bIsLogin = 'true';
password = ele.item(i).value;
{
password = ele.item(i).value;
if (password.length > 0)
{
bIsLogin = 'true';
}
else
{
break;
}
sPromptURL = sPromptURL + "&" + ele.item(i).name + "=" + ele.item(i).value;
// don't prompt user if password field is the same