changeset 27:03144b0d470d

Use jQuery $.trim() in shoutbox.js.
author Brian Neal <bgneal@gmail.com>
date Tue, 21 Apr 2009 23:25:05 +0000
parents db40c2754580
children 04377c5bf912
files media/js/shoutbox.js
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
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;
       }