diff options
| author | timb <timb@mb.local> | 2010-03-12 05:58:52 -0800 |
|---|---|---|
| committer | timb <timb@mb.local> | 2010-03-12 05:58:52 -0800 |
| commit | 97580f108b61e514989065858450de8ca63e52c3 (patch) | |
| tree | 3c25033239efd4b191bb1b0783cdd62ca9ec52d3 /static/js | |
| parent | 8aa89f36f5aa59a853daaf24571bb2cddc7e9760 (diff) | |
prevent huge messages from sending (client side block only)
Diffstat (limited to 'static/js')
| -rwxr-xr-x | static/js/pichat.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index 7314ff8..1a0f1df 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -121,6 +121,10 @@ function submitMessage() { var content = $.trim($('#msgInput').val()); $('#msgInput').val(''); if (content == '') { return; } + if (content.length > 6666) { + alert("POST TOO LONG DUDE!"); + return; + } // this shouldn't just be client side :V PendingMessages[content] = true; var msg = { 'nick': Nick, 'content': content }; |
