summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/hid.js
diff options
context:
space:
mode:
authorOwen D'Aprile <[email protected]>2021-02-07 14:18:52 -0500
committerOwen D'Aprile <[email protected]>2021-02-07 14:18:52 -0500
commitcc909352b4844784198e85744b7a1786bca52ba2 (patch)
tree5201fffd470a0703b7d26c42786a0e4ee9f049bb /web/share/js/kvm/hid.js
parentc9ee9b2e6a8cf0feed7f42876592c757da019813 (diff)
Web interface spelling fixes and improvements
Also make the popup message for pasting characters change plurality depending on the amount of characters.
Diffstat (limited to 'web/share/js/kvm/hid.js')
-rw-r--r--web/share/js/kvm/hid.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js
index 4b4324bc..efbb46c0 100644
--- a/web/share/js/kvm/hid.js
+++ b/web/share/js/kvm/hid.js
@@ -196,10 +196,10 @@ 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 = `
- You're going to paste ${text.length} characters.<br>
- Are you sure you want to continue?
- `;
+ let confirm_msg = text.length !== 1 ?
+ `You're going to paste ${text.length} characters.<br>` :
+ `You're going to paste ${text.length} character.<br>`;
+ confirm_msg += "Are you sure you want to continue?";
wm.confirm(confirm_msg).then(function(ok) {
if (ok) {