From 2e10fb4c9bd7af4691f470ab71fe101fd00a29d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A4r=20Halberkamp?= Date: Thu, 24 Sep 2015 23:38:24 +0200 Subject: [PATCH] Add |uhtml| features for use in the poll command --- js/client-chat.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/js/client-chat.js b/js/client-chat.js index d609eb26f..1bafd2d5d 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -1099,6 +1099,16 @@ this.$chat.append('
' + Tools.sanitizeHTML(row.slice(1).join('|')) + '
'); break; + case 'uhtml': + this.$chat.append('
' + Tools.sanitizeHTML(row.slice(2).join('|')) + '
'); + break; + + case 'uhtmlchange': + var $elements = $(this.$chat.find('div.uhtml-' + toId(row[1]) + '"')); + if (!$elements.length) break; + $elements.html(Tools.sanitizeHTML(row.slice(2).join('|'))); + break; + case 'unlink': // note: this message has global effects, but it's handled here // so that it can be included in the scrollback buffer. @@ -1266,7 +1276,7 @@ var oName = pmuserid === app.user.get('userid') ? name : pm; var clickableName = '' + Tools.escapeHTML(name.substr(1)) + ''; this.$chat.append( - '
' + ChatRoom.getTimestamp('lobby', deltatime) + + '
' + ChatRoom.getTimestamp('lobby', deltatime) + '' + clickableName + ':' + '(Private to ' + Tools.escapeHTML(pm) + ') ' + Tools.parseMessage(message) + '' + '
'