aboutsummaryrefslogtreecommitdiff
path: root/lib.js
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-04-07 09:50:48 -0500
committerEv Bogue <ev@evbogue.com>2019-04-07 09:50:48 -0500
commit9cc6c1cdc10516cd348e87c407c5c72d90304a41 (patch)
tree2682fe6617925b43ac1ee1aa2757e9af54e40def /lib.js
parent0e966de0cc44a4f506a6f68d4554a5322bab7dce (diff)
shorten hashes in urls so they stay on page in mobile
Diffstat (limited to 'lib.js')
-rw-r--r--lib.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.js b/lib.js
index 97f8db3..b7919cc 100644
--- a/lib.js
+++ b/lib.js
@@ -169,7 +169,7 @@ function renderMessage (post) {
if (post.content.reply) {
message.appendChild(h('span', [
're: ',
- h('a', {href: '#' + post.content.reply}, [post.content.reply])
+ h('a', {href: '#' + post.content.reply}, [post.content.reply.substring(0, 10) + '...'])
]))
}
@@ -234,7 +234,7 @@ function getImage (id) {
}
function getName (id) {
- var name = h('span', [id])
+ var name = h('span', [id.substring(0, 10) + '...'])
if (localStorage[id]) {
var log = JSON.parse(localStorage[id])
for (var i=0; i < log.length; i++) {