Browse Source

Secret key is loaded on the client only when needed and removed from DOM when hidden

master
Block Tester 11 years ago
parent
commit
8a520f6a3f
  1. 21
      interface_profile-edit.js

21
interface_profile-edit.js

@ -39,14 +39,21 @@ function initProfileEdit() { @@ -39,14 +39,21 @@ function initProfileEdit() {
loadAvatarForEdit();
loadProfileForEdit();
dumpPrivkey(defaultScreenName, function(args, key) {
$(".secret-key-container").hide();
$(".secret-key").text(key);
$(".secret-key-container").hide();
$(".toggle-priv-key").click(function () {
$(".secret-key-container").fadeToggle();
});
}, {});
$(".toggle-priv-key").click(function () {
if ($(".secret-key-container").is(":visible")) {
$(".secret-key-container").fadeOut(function () {
$(".secret-key").text('');
});
} else {
dumpPrivkey(defaultScreenName, function(args, key) {
$(".secret-key").text(key);
$(".secret-key-container").fadeIn();
}, {});
}
});
});
}

Loading…
Cancel
Save