forked from retoor/snek
feat: add image source to reply text when generating reply link in web template
This commit is contained in:
@@ -99,9 +99,15 @@ function updateTimes() {
|
||||
const rect = container.getBoundingClientRect();
|
||||
if (rect.top >= 0 && rect.bottom <= viewportHeight) {
|
||||
const messageDiv = container.closest('.message');
|
||||
const text = messageDiv.querySelector(".text").innerText;
|
||||
let text = messageDiv.querySelector(".text").innerText;
|
||||
const time = document.createElement("span");
|
||||
time.innerText = app.timeDescription(container.dataset.created_at);
|
||||
messageDiv.querySelectorAll("img").forEach(img => {
|
||||
text += " " + '';
|
||||
})
|
||||
|
||||
|
||||
|
||||
container.replaceChildren(time);
|
||||
const reply = document.createElement("a");
|
||||
reply.innerText = " reply";
|
||||
|
||||
Reference in New Issue
Block a user