Browse Source

quick fix for too long user names

master
dennisdebel 10 years ago
parent
commit
d974b08694
  1. 2
      web/main.js

2
web/main.js

@ -77,7 +77,7 @@ function onSubmitMessage(){
return false; return false;
} }
var namm = document.getElementById('name').value; var namm = document.getElementById('name').value;
if ( !namm || namm === "" ) { if ( !namm || namm === "" || namm.length > 20) { /* prevent too long usernames */
namm = "anonymous"; namm = "anonymous";
} }
addOutboxItem( namm, "<p class='text-message'>"+msg+"</p>" ); addOutboxItem( namm, "<p class='text-message'>"+msg+"</p>" );

Loading…
Cancel
Save