aboutsummaryrefslogtreecommitdiff
path: root/lib.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib.js')
-rw-r--r--lib.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib.js b/lib.js
index b7919cc..f212b10 100644
--- a/lib.js
+++ b/lib.js
@@ -174,7 +174,17 @@ function renderMessage (post) {
}
message.appendChild(h('div', {innerHTML: marked(post.content.text)}))
- message.appendChild(h('pre', [JSON.stringify(post)]))
+
+
+ message.appendChild(h('span', {id: post.key + 'src', classList: 'right'}, [
+ h('a', {
+ onclick: function () {
+ message.appendChild(h('pre', [JSON.stringify(post)]))
+ var span = document.getElementById(post.key + 'src')
+ span.parentNode.removeChild(span)
+ }
+ }, ['[src]'])
+ ]))
var gotName = getName(post.content.author)