Permalink
Browse files

Fill Passwordfield on Enter (Fixes passwordmaker#14)

  • Loading branch information...
bitboxer committed Jul 28, 2011
1 parent 970a4a4 commit df84affab4274862895dd80e70a1ff8dc40cb76a
Showing with 12 additions and 18 deletions.
  1. +0 −9 css/popup.css
  2. +12 −9 javascript/popup.js
View
@@ -49,15 +49,6 @@ label {
font-size:15px;
}
#generated{
color: #5E80F0;
font-style: italic;
text-align: center;
width: 200px;
border: 1px solid #000000;
font-size:15px;
}
select {
margin: 0px;
width: 200px;
View
@@ -42,14 +42,6 @@ function updateFields(e) {
$("#generatedForClipboard").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');
@@ -118,6 +110,8 @@ function init(url) {
password = $("#password").val();
if (password == null || password.length == 0 || (password != $("#confirmation").val())) {
$("#password").focus();
} else {
$("#generated").focus();
}
});
}
@@ -148,7 +142,6 @@ $(function() {
$("#activatePassword").show();
} else {
$("#generated").show();
$("#generated").focus();
$("#activatePassword").hide();
}
@@ -160,6 +153,16 @@ $(function() {
}
}
$("#generated").keypress(function(event) {
if (event.keyCode == 13) {
chrome.tabs.sendRequest(currentTab, {hasPasswordField: true}, function(response) {
if (response.hasField) {
fillPassword();
}
});
}
});
chrome.windows.getCurrent(function(obj) {
chrome.tabs.getSelected(obj.id, function(tab) {
currentTab = tab.id;

0 comments on commit df84aff

Please sign in to comment.