summaryrefslogtreecommitdiff
path: root/web/share/js/kvm
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-03-11 19:54:55 +0300
committerMaxim Devaev <[email protected]>2022-03-11 19:54:55 +0300
commitf04617ac4f3bbe4b4512d09efacd0787b950bf8d (patch)
tree6fdcbd67f157cb06c0408a66ae06922e39de6dbd /web/share/js/kvm
parent6d6630a4dd4f194b567f1ccd47144b57f6943f42 (diff)
pikvm/pikvm#616: secure text switch
Diffstat (limited to 'web/share/js/kvm')
-rw-r--r--web/share/js/kvm/hid.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js
index ecf8d39f..1d7a4ff3 100644
--- a/web/share/js/kvm/hid.js
+++ b/web/share/js/kvm/hid.js
@@ -72,6 +72,14 @@ export function Hid(__getGeometry, __recorder) {
window.addEventListener("blur", __releaseAll);
tools.storage.bindSimpleSwitch($("hid-pak-ask-switch"), "hid.pak.ask", true);
+ tools.storage.bindSimpleSwitch($("hid-pak-secure-switch"), "hid.pak.secure", false, function(value) {
+ $("hid-pak-text").style.setProperty("-webkit-text-security", (value ? "disc" : "none"));
+ });
+ tools.feature.setEnabled($("hid-pak-secure"), (
+ tools.browser.is_chrome
+ || tools.browser.is_safari
+ || tools.browser.is_opera
+ ));
$("hid-pak-keymap-selector").addEventListener("change", function() {
tools.storage.set("hid.pak.keymap", $("hid-pak-keymap-selector").value);