lib/jschat/http/public/javascripts/app/protocol/display.js in jschat-0.2.9 vs lib/jschat/http/public/javascripts/app/protocol/display.js in jschat-0.3.0

- old
+ new

@@ -12,11 +12,11 @@ element.observe('load', this.scrollMessagesToTop); }.bind(this)); }, message: function(message, time) { - var name = $('name').innerHTML; + var name = JsChat.user.name; var user_class = name == message['user'] ? 'user active' : 'user'; var text = '<span class="\#{user_class}">\#{user}</span> <span class="\#{message_class}">\#{message}</span>'; if (message['message'].match(new RegExp(name, 'i')) && name != message['user']) { user_class = 'user mentioned'; @@ -58,10 +58,9 @@ this.ignore_notices = false; this.scrollMessagesToTop(); /* This is assumed to be the point at which displaying /lastlog completes */ $('loading').hide(); - Cookie.create('jschat-name', $('name').innerHTML, 28, '/'); }, scrollMessagesToTop: function() { if (!this.scrolled) { $('messages').scrollTop = $('messages').scrollHeight;