refactoring

This commit is contained in:
Devaev Maxim
2021-02-07 23:26:50 +03:00
parent 365d8e9fef
commit 711816bd26
2 changed files with 3 additions and 5 deletions

View File

@@ -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) {