summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/hid.js
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 /web/share/js/kvm/hid.js
parent365d8e9fefd454933e536a76f2c28e8ec6056625 (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/hid.js')
-rw-r--r--web/share/js/kvm/hid.js4
1 files changed, 1 insertions, 3 deletions
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) {