diff options
author | Killy | 2017-10-24 02:10:03 +0300 |
---|---|---|
committer | Killy | 2017-10-24 02:10:03 +0300 |
commit | 99c83acf6295d2d40b228be2bcff41689a0d5d5b (patch) | |
tree | ec6d0548a84d2d80d0d3dbb91925890d2c95ce2a | |
parent | 3a04d927c3f6b9209514ee9faa0d95bbaf77145f (diff) |
www: update incoming reply format
-rw-r--r-- | juick-www/src/main/static/scripts.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index ad6d2e66..4cd1bc82 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -182,30 +182,28 @@ function isTreeMode() { } function wsIncomingReply(msg) { - const unsetProto = (url) => url.replace(/^(https?:)?(?=\/\/)/i, ''); let msgNum = '/' + msg.rid; if (msg.replyto > 0) { msgNum += ` ${i18n('message.inReplyTo')} <a href="#${msg.replyto}">/${msg.replyto}</a>`; } - let photoDiv = (msg.photo === undefined) ? '' : ` + let photoDiv = (msg.attach === undefined) ? '' : ` <div class="msg-media"><a href="//i.juick.com/p/${msg.mid}-${msg.rid}.${msg.attach}"> - <img src="${unsetProto(msg.photo.small)}"/></a> + <img src="//i.juick.com/photos-512/${msg.mid}-${msg.rid}.${msg.attach}"/></a> </div>`; let msgContHtml = ` <div class="msg-cont"> <div class="msg-header"> - @<a href="/${msg.user.uname}/">${msg.user.uname}</a>: + <a href="/${msg.user.uname}/">${msg.user.uname}</a>: <div class="msg-avatar"> <a href="/${msg.user.uname}/"><img src="//i.juick.com/a/${msg.user.uid}.png" alt="${msg.user.uname}"/></a> </div> - <div class="msg-menu"><a href="#"><i data-icon="ei-link" data-size="s"></i></a></div> <div class="msg-ts"> <a href="/${msg.mid}#${msg.rid}" title="${msg.timestamp}GMT">${msg.timestamp}</a> </div> </div> <div class="msg-txt">${killy.format(msg.body, msg.mid, false)}</div>${photoDiv} <div class="msg-links">${msgNum} · <a class="msg-reply-link" href="#">${i18n('message.reply')}</a></div> - <div class="msg-comment" style="display: none;"></div> + <div class="msg-comment msg-comment-hidden"></div> </div>`; let li = document.createElement('li'); |