From 9cc6c1cdc10516cd348e87c407c5c72d90304a41 Mon Sep 17 00:00:00 2001 From: Ev Bogue Date: Sun, 7 Apr 2019 09:50:48 -0500 Subject: shorten hashes in urls so they stay on page in mobile --- lib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib.js') 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++) { -- cgit v1.2.3-70-g09d2