From 195a9d7bfbf1d1b612d06f53a2716a4a644e65c3 Mon Sep 17 00:00:00 2001 From: Chad Kimes Date: Mon, 10 Aug 2015 17:22:50 -0400 Subject: [PATCH 1/2] Highlight messages for user's nick --- client/client.js | 3 +++ client/scheme.less | 6 ++++++ client/style.less | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/client/client.js b/client/client.js index f4dd868..0953a29 100644 --- a/client/client.js +++ b/client/client.js @@ -154,6 +154,9 @@ function pushMessage(args) { else if (args.nick == '*') { messageEl.classList.add('info') } + else if (args.text && args.text.indexOf("@" + myNick + " ") != -1) { + messageEl.classList.add('direct') + } // Nickname var nickSpanEl = document.createElement('span') diff --git a/client/scheme.less b/client/scheme.less index 40a3673..80e8288 100644 --- a/client/scheme.less +++ b/client/scheme.less @@ -56,6 +56,12 @@ input, textarea { } } +.direct { + .text { + color: @base09; + } +} + #footer { background: @base00; } diff --git a/client/style.less b/client/style.less index ec1b48e..1891381 100644 --- a/client/style.less +++ b/client/style.less @@ -100,6 +100,10 @@ ul { margin: 0; } +.direct .text { + font-weight: bold; +} + #footer { position: fixed; bottom: 0; From 01a3ff68dbbd43caf33830289ffcbea69dbc345f Mon Sep 17 00:00:00 2001 From: ckimes89 Date: Tue, 11 Aug 2015 09:29:28 -0400 Subject: [PATCH 2/2] Fix message highlighting for users with trip code --- client/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client.js b/client/client.js index 0953a29..fd8dd1a 100644 --- a/client/client.js +++ b/client/client.js @@ -154,7 +154,7 @@ function pushMessage(args) { else if (args.nick == '*') { messageEl.classList.add('info') } - else if (args.text && args.text.indexOf("@" + myNick + " ") != -1) { + else if (args.text && args.text.indexOf("@" + myNick.split("#")[0] + " ") != -1) { messageEl.classList.add('direct') }