Merge pull request #94 from lorenzhs/highlight

Visually highlight highlights
This commit is contained in:
David Cormier 2013-12-17 06:54:34 -08:00
commit dc0b4c1a73
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,9 @@
/* highlight messages */
.highlight {
color: yellow;
font-weight: bold;
}
/* style options, foreground */ /* style options, foreground */
.cof-separator { .cof-separator {
color: #68b5d4; color: #68b5d4;

View file

@ -187,6 +187,12 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
var content = weeChat.Protocol.rawText2Rich(message['message']); var content = weeChat.Protocol.rawText2Rich(message['message']);
addClasses(content); addClasses(content);
if (highlight) {
prefix.forEach(function(textEl) {
textEl.classes.push('highlight');
});
}
var rtext = ""; var rtext = "";
if(content[0] != undefined) { if(content[0] != undefined) {
rtext = content[0]['text']; rtext = content[0]['text'];