summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-02-07 23:26:50 +0300
committerDevaev Maxim <[email protected]>2021-02-07 23:26:50 +0300
commit711816bd2665b450a63d90744740bb4cc0df4efe (patch)
treeff3da6538bf7fdf8e6cc78f794b825c1db000adb
parent365d8e9fefd454933e536a76f2c28e8ec6056625 (diff)
refactoring
-rw-r--r--web/share/js/kvm/atx.js4
-rw-r--r--web/share/js/kvm/hid.js4
2 files changed, 3 insertions, 5 deletions
diff --git a/web/share/js/kvm/atx.js b/web/share/js/kvm/atx.js
index 234c86c2..3ec04351 100644
--- a/web/share/js/kvm/atx.js
+++ b/web/share/js/kvm/atx.js
@@ -40,11 +40,11 @@ export function Atx() {
["atx-power-button", "power", "Are you sure you want to press the power button?"],
["atx-power-button-long", "power_long", `
Are you sure you want to long press the power button?<br>
- (Warning! This could cause data loss on the server.)
+ Warning! This could cause data loss on the server.
`],
["atx-reset-button", "reset", `
Are you sure you want to press the reset button?<br>
- (Warning! This could case data loss on the server.)
+ Warning! This could case data loss on the server.
`],
]) {
tools.setOnClick($(args[0]), () => __clickButton(args[1], args[2]));
diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js
index efbb46c0..bcd1e479 100644
--- a/web/share/js/kvm/hid.js
+++ b/web/share/js/kvm/hid.js
@@ -196,9 +196,7 @@ export function Hid() {
var __clickPasteAsKeysButton = function() {
let text = $("hid-pak-text").value.replace(/[^\x00-\x7F]/g, ""); // eslint-disable-line no-control-regex
if (text) {
- let confirm_msg = text.length !== 1 ?
- `You're going to paste ${text.length} characters.<br>` :
- `You're going to paste ${text.length} character.<br>`;
+ let confirm_msg = `You're going to paste ${text.length} character${text.length ? "s" : ""}.<br>`;
confirm_msg += "Are you sure you want to continue?";
wm.confirm(confirm_msg).then(function(ok) {