Let timestamps link directly to the message, makes it easier to see a thread from channel or user-feed
This commit is contained in:
@@ -331,7 +331,7 @@ function renderMsg(opts, msg) {
|
|||||||
escape(msg.value.author) +
|
escape(msg.value.author) +
|
||||||
'"' +
|
'"' +
|
||||||
">" + msg.author.name + "</a>" +
|
">" + msg.author.name + "</a>" +
|
||||||
msgTimestamp(msg, name) +
|
msgTimestamp(msg, opts.base + name) +
|
||||||
'</figcaption>' +
|
'</figcaption>' +
|
||||||
'</figure>' +
|
'</figure>' +
|
||||||
'</header>' +
|
'</header>' +
|
||||||
@@ -340,13 +340,13 @@ function renderMsg(opts, msg) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function msgTimestamp(msg, name) {
|
function msgTimestamp(msg, link) {
|
||||||
var date = new Date(msg.value.timestamp);
|
var date = new Date(msg.value.timestamp);
|
||||||
var isoStr = date.toISOString();
|
var isoStr = date.toISOString();
|
||||||
return (
|
return (
|
||||||
'<time class="ssb-timestamp" datetime="' + isoStr + '">' +
|
'<time class="ssb-timestamp" datetime="' + isoStr + '">' +
|
||||||
'<a ' +
|
'<a ' +
|
||||||
'href="#' + name + '" ' +
|
'href="' + link + '" ' +
|
||||||
'title="' + isoStr + '" ' +
|
'title="' + isoStr + '" ' +
|
||||||
'>' + formatDate(date) + '</a>' +
|
'>' + formatDate(date) + '</a>' +
|
||||||
'</time>'
|
'</time>'
|
||||||
|
|||||||
Reference in New Issue
Block a user