Commit 42c466b4df95b6087c9bd667c507c630a7d88843
Let timestamps link directly to the message, makes it easier to see a thread from channel or user-feed
Anders Rune Jensen committed on 5/31/2017, 7:20:43 PMParent: f5e2111be8db7544d34c2400b3b8b02a24ed91e8
Files changed
render.js | changed |
render.js | ||
---|---|---|
@@ -330,24 +330,24 @@ | ||
330 | 330 … | ' href="' + opts.base + |
331 | 331 … | escape(msg.value.author) + |
332 | 332 … | '"' + |
333 | 333 … | ">" + msg.author.name + "</a>" + |
334 | - msgTimestamp(msg, name) + | |
334 … | + msgTimestamp(msg, opts.base + name) + | |
335 | 335 … | '</figcaption>' + |
336 | 336 … | '</figure>' + |
337 | 337 … | '</header>' + |
338 | 338 … | render(opts, c) + |
339 | 339 … | "</article>" |
340 | 340 … | ); |
341 | 341 … | } |
342 | 342 … | |
343 | -function msgTimestamp(msg, name) { | |
343 … | +function msgTimestamp(msg, link) { | |
344 | 344 … | var date = new Date(msg.value.timestamp); |
345 | 345 … | var isoStr = date.toISOString(); |
346 | 346 … | return ( |
347 | 347 … | '<time class="ssb-timestamp" datetime="' + isoStr + '">' + |
348 | 348 … | '<a ' + |
349 | - 'href="#' + name + '" ' + | |
349 … | + 'href="' + link + '" ' + | |
350 | 350 … | 'title="' + isoStr + '" ' + |
351 | 351 … | '>' + formatDate(date) + '</a>' + |
352 | 352 … | '</time>' |
353 | 353 … | ); |
Built with git-ssb-web