Skip to content

Commit

Permalink
hide password when run with -l
Browse files Browse the repository at this point in the history
  • Loading branch information
wind committed Sep 14, 2018
1 parent 82eb0e5 commit da901d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@
$(window).trigger('cursor:ready');
}

function addNewLine() {
function addNewLine(hidden) {
var id = "ln" + ++uiLineIdx;
appendContent("<div id=\"" + id + "\">" + prompt + promptChar + "&nbsp;<span id=\"lnCnt\"></span><span id=\"cursor\" class=\"inverse\">&nbsp;</span><span id=\"lnSuf\"></span></div>");
appendContent("<div id=\"" + id + "\">" + prompt + promptChar + "&nbsp;<span id=\"lnCnt\"" + (hidden?" style=display:none":"") + "></span><span id=\"cursor\" class=\"inverse\">&nbsp;</span><span id=\"lnSuf\"></span></div>");
uiLineWrp = $("#" + id);
uiLineCnt = uiLineWrp.find("#lnCnt");
uiLineSuf = uiLineWrp.find("#lnSuf");
Expand Down Expand Up @@ -425,7 +425,7 @@
clearCursor();
channel = "password";
appendContent("password: ");
addNewLine();
addNewLine(true);
});

$(window.document).keypress(function (e) {
Expand Down

0 comments on commit da901d6

Please sign in to comment.