diff options
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -1,35 +1,5 @@ var screen = h('div', {id: 'screen'}) document.body.appendChild(screen) -function compose (keys) { - var message = h('div', {classList: 'message'}) - - var scroller = document.getElementById('scroller') - - scroller.insertBefore(message, scroller.firstChild) - - var textarea = h('textarea', {placeholder: 'Write a new bog post'}) - - message.appendChild(textarea) - - var composer = h('div', [ - h('button', { - onclick: function () { - if (textarea.value) { - var content = { - author: keys.publicKey, - type: 'post', - text: textarea.value, - timestamp: Date.now() - } - textarea.value = '' - publish(content, keys) - } - } - }, ['Publish']) - ]) - message.appendChild(composer) -} - function keyPage (keys) { var scroller = document.getElementById('scroller') |