From 966f1841a0efd2d28f948fa5a409f9913b1a3ad2 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Thu, 25 May 2006 15:42:34 +0000 Subject: [PATCH] Firefox extension: prompt only when user enters a password. --- .../common/casajar/content/casaOverlay.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/extensions/common/casajar/content/casaOverlay.js b/extensions/common/casajar/content/casaOverlay.js index 36c14311..fe738c21 100644 --- a/extensions/common/casajar/content/casaOverlay.js +++ b/extensions/common/casajar/content/casaOverlay.js @@ -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