Mercurial > public > sg101
diff media/js/shoutbox.js @ 27:03144b0d470d
Use jQuery $.trim() in shoutbox.js.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 21 Apr 2009 23:25:05 +0000 |
parents | f408971657b9 |
children | 3ae999b0c53b |
line wrap: on
line diff
--- a/media/js/shoutbox.js Sun Apr 19 22:21:34 2009 +0000 +++ b/media/js/shoutbox.js Tue Apr 21 23:25:05 2009 +0000 @@ -2,9 +2,7 @@ var submit = $('#shoutbox-submit'); submit.click(function () { var input = $('#shoutbox-smiley-input'); - var msg = input.val(); - msg = msg.replace(/^\s+/, ''); - msg = msg.replace(/\s+$/, ''); + var msg = $.trim(input.val()); if (msg.length == 0) { return false; }