We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 7cb9b153 authored by Evan Prodromou's avatar Evan Prodromou

remove hack to count bytes, not chars, in JS, since we now use chars

parent e8e91dc2
......@@ -2,11 +2,7 @@ $(document).ready(function(){
// count character on keyup
function counter(){
var maxLength = 140;
var currentLength = $("#status_textarea").val()
.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "drry")
.replace(/[\u0800-\uFFFF]/g, "drr")
.replace(/[\u0080-\u07FF]/g, "dr")
var currentLength = $("#status_textarea").val().length;
var remaining = maxLength - currentLength;
var counter = $("#counter");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment