Using CSS to hide repeated nicks
authorDarren <darren@darrenwhitlen.com>
Sat, 22 Jun 2013 16:39:43 +0000 (17:39 +0100)
committerDarren <darren@darrenwhitlen.com>
Sat, 22 Jun 2013 16:39:43 +0000 (17:39 +0100)
client/assets/css/style.css
client/assets/src/views/panel.js

index 2a10591503ce0ddfa6f90ee98551e0a5d9e52f87..03135ea2487b241e5e64faea45c6ad6230a56ca1 100644 (file)
@@ -578,6 +578,7 @@ html, body { height:100%; }
 
 #kiwi.theme_relaxed .messages .msg.global_nick_highlight,
 #kiwi.theme_relaxed .messages .msg.highlight { background:#D9D9D9; }
+#kiwi.theme_relaxed .messages .msg.repeated_nick .nick { visibility:hidden; }
 
 /* Narrow styling (window width < 400px) */
 #kiwi.theme_relaxed.narrow .messages .msg .nick { width: auto; }
index 553f2d4929d695170c2a15ed9e5d5904204f6c23..bcc8ac12b44e7648044a18507948847880307625 100644 (file)
@@ -121,7 +121,7 @@ _kiwi.view.Panel = Backbone.View.extend({
             // Time difference between this message and the last (in minutes)
             time_difference = (template_vars.date.getTime() - prev_msg.date.getTime())/1000/60;
             if (prev_msg.nick === template_vars.nick && time_difference < 1) {
-                template_vars.nick = '';
+                msg_css_classes += ' repeated_nick';
             }
         }