diff --git a/src/General/css/style.css b/src/General/css/style.css index 1eb360750..8b58526f3 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -1159,13 +1159,6 @@ input[name="Default Volume"] { float: right; padding: 0 3px; } -#qr .warning { - min-height: 1.6em; - vertical-align: middle; - padding: 0 1px; - border-width: 1px; - border-style: solid; -} .qr-link-container { text-align: center; } @@ -1490,6 +1483,9 @@ a:only-of-type > .remove { right: 1px; pointer-events: none; } +#char-count.warning { + color: red; +} /* Menu */ .menu-button:not(.fa-bars) { diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 1559e8e62..ca843f25f 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -291,10 +291,10 @@ QR = characterCount: -> counter = QR.nodes.charCount - count = QR.nodes.com.textLength + count = QR.nodes.com.value.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, '_').length counter.textContent = count counter.hidden = count < 1000 - (if count > 1500 then $.addClass else $.rmClass) counter, 'warning' + (if count > 2000 then $.addClass else $.rmClass) counter, 'warning' getFile: -> $.event 'QRFile', QR.selected?.file