Permalink
Browse files

press enter in confirmation to fill password

  • Loading branch information...
Zak Kriner authored and bitboxer committed Mar 17, 2011
1 parent 8a0505f commit ce08d44f9301bc7677fab238db6e180c57b375d0
Showing with 10 additions and 2 deletions.
  1. +1 −1 html/popup.html
  2. +9 −1 javascript/popup.js
View
@@ -25,7 +25,7 @@
<img src='../images/passwdmaker16.png' width='16px' height='16px'/><span>PasswordMaker Pro</span>
</div>
<div class='row'><label for='password'>Password:</label><input onkeyup="updateFields();" onchange="updateFields();" class='input' id='password' type="password"/></div>
<div class='row' id='confirmation_row'><label for='confirmation'>Confirmation:</label><input onkeyup="updateFields();" onchange="updateFields();" class='input' id='confirmation' type="password"/></div>
<div class='row' id='confirmation_row'><label for='confirmation'>Confirmation:</label><input onkeyup="updateFields(event);" onchange="updateFields(event);" class='input' id='confirmation' type="password"/></div>
<div class='row'><label>Save Password:</label>
<select id="store_location" name="store_location" onchange="updateFields();">
<option value="memory">In memory</option>
View
@@ -9,7 +9,7 @@ function setPasswordColors(foreground, background) {
$("#confirmation").css("color", foreground);
}
function updateFields() {
function updateFields(e) {
var password = $("#password").val();
var confirmation = $("#confirmation").val();
var profileId = $("#profile").val();
@@ -35,6 +35,14 @@ function updateFields() {
$("#generated").val("");
}
setPasswordColors("#000000", "#FFFFFF")
// pressed enter in confirmation field
if(e && e.keyCode == 13){
chrome.tabs.sendRequest(currentTab, {hasPasswordField: true}, function(response) {
if (response.hasField) {
fillPassword();
}
});
}
}
if (Settings.keepMasterPasswordHash()) {
$("#confirmation_row").css('display', 'none');

0 comments on commit ce08d44

Please sign in to comment.