diff options
author | Ev Bogue <ev@evbogue.com> | 2019-12-15 08:46:01 -0600 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2019-12-15 08:46:01 -0600 |
commit | d8f46fdf6f93816edadab397c3d043ed85c2e359 (patch) | |
tree | fa448eae18e214e97cd5de5e49c80e8162b5a325 | |
parent | 0ce80cde9303db97124ada1a5745aed554041859 (diff) |
clean up
-rw-r--r-- | render.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -157,7 +157,6 @@ function render (msg, keys, preview) { message.appendChild(getHeader(msg, keys)) if (msg.reply) { - //message.appendChild(h('span', [ message.firstChild.appendChild(h('span', [ 're: ', h('a', {href: '#' + msg.reply}, [msg.reply.substring(0, 10) + '...']) @@ -168,10 +167,11 @@ function render (msg, keys, preview) { message.appendChild(h('button', { onclick: function () { quickName(msg.author).then(name => { + var compose = h('div', {classList: 'submessage'}, [composer(keys, msg, name)]) if (messageDiv.firstChild) { - messageDiv.insertBefore(h('div', {classList: 'submessage'}, [composer(keys, msg, name)]), messageDiv.childNodes[1]) + messageDiv.insertBefore(compose), messageDiv.childNodes[1]) } else { - messageDiv.appendChild(h('div', {classList: 'submessage'}, [composer(keys, msg, name)])) + messageDiv.appendChild(compose) } }) } |