Permalink
Browse files

Fixed issue passwordmaker#37

  • Loading branch information...
Akaiten
Akaiten committed Jan 29, 2012
1 parent e9910c4 commit 10c0a4686f674ce52cede337029db0e4c48434d5
Showing with 3 additions and 2 deletions.
  1. +1 −1 html/popup.html
  2. +2 −1 javascript/popup.js
View
@@ -34,7 +34,7 @@
</select>
</div>
<div class='row'><label>Use Profile:</label>
<select id="profile" name="profile" onchange="fetchUrlAndUpdateUsedText();updateFields();">
<select id="profile" name="profile" onchange="onProfileChanged();">
</select>
</div>
<div class='row'><label for='usedtext'>Used text:</label><input onkeyup="updateFields();" onchange="updateFields();" class='input' id='usedtext'/></div>
View
@@ -109,10 +109,11 @@ function updateUsedText(url) {
$("#usedtext").val(profile.getUrl(url));
}
function fetchUrlAndUpdateUsedText() {
function onProfileChanged() {
chrome.windows.getCurrent(function(obj) {
chrome.tabs.getSelected(obj.id, function(tab) {
updateUsedText(tab.url);
updateFields();
});
});
}

0 comments on commit 10c0a46

Please sign in to comment.