Skip to content

Commit

Permalink
Add option to show/hide access password
Browse files Browse the repository at this point in the history
  • Loading branch information
proginosko committed Nov 13, 2022
1 parent 49b5c7e commit 92e17b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion options.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@
</p>
<p>
<label>Password:</label>
<input id="accessPassword" type="text" size="60">
<input id="accessPassword" type="password" size="40">
&nbsp;&nbsp;&nbsp;&nbsp;
<input id="accessPasswordShow" type="checkbox">
<label for="accessPasswordShow">Show password</label>
</p>
<p>
<input id="hidePassword" type="checkbox">
Expand Down
9 changes: 9 additions & 0 deletions options.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function initForm(numSets) {
});
$(`#advOpts${set}`).css("display", "none");
}
$("#accessPasswordShow").change(accessPasswordShow);
$("#overridePasswordShow").change(overridePasswordShow);
$("#theme").change(function (e) { setTheme($("#theme").val()); });
$("#clockOffset").click(showClockOffsetTime);
Expand Down Expand Up @@ -641,6 +642,14 @@ function displayAccessCode(code, asImage) {
}
}

// Show/hide access password
//
function accessPasswordShow() {
let input = getElement("accessPassword");
let checkbox = getElement("accessPasswordShow");
input.type = checkbox.checked ? "text" : "password";
}

// Show/hide override password
//
function overridePasswordShow() {
Expand Down

0 comments on commit 92e17b0

Please sign in to comment.