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

darcs-hash:20080817153143-84dde-1ff56e4066c0905e8846876bc9de22eca999f826.gz
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")
.length;
var currentLength = $("#status_textarea").val().length;
var remaining = maxLength - currentLength;
var counter = $("#counter");
counter.text(remaining);
......
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