Make comment-links work.

This commit is contained in:
tastytea 2019-11-25 07:33:29 +01:00
parent 050f040903
commit 9513c79076
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@
(spoiler_text || sensitive ? h('spoiler', spoiler_text || h('spoiler-empty', 'Sensitive', 'span')) : '') +
h('status-content' + (spoiler_text || sensitive ? ' sensitive' : ''), moji(content, emojis)) +
(replies ? h('replies', html(replies, domain)) : '') +
h(`reply" target="_blank" href="https://${domain}/interact/${id}?type=reply`, 'Reply', 'a'))).join('')
h(`reply" target="_blank" href="https://${domain}/notice/${id}`, 'Reply', 'a'))).join('')
}
function moderate(statuses, id) {
@ -95,7 +95,7 @@
fetch(`https://${domain}/api/v1/statuses/${status}/context`)
.then(res => res.json())
.then(res => {
el.innerHTML = h(`reply-main" target=\"_blank\" href="https://${domain}/interact/${status}?type=reply`, 'Comment', 'a')
el.innerHTML = h(`reply-main" target=\"_blank\" href="https://${domain}/notice/${status}`, 'Comment', 'a')
const statuses = moderate(res.descendants, el.dataset.moderator)
if (statuses) {
el.innerHTML += html('deep' in el.dataset ? tree(statuses, { id: status }, el.dataset.deep || -1).replies : statuses, domain)
@ -105,4 +105,4 @@
})
.catch(() => fail(el, 'Request fail'))
}
})()
})()