thread_autoupdater.js: update tslp on ajax post

This commit is contained in:
Jon 2024-02-26 21:11:44 +00:00 committed by towards-a-new-leftypol
parent c5cf671929
commit 07db8e2db4
1 changed files with 3 additions and 1 deletions

View File

@ -153,8 +153,10 @@ $().ready(() => {
$(document).on("ajax_after_post", (_, xhr_body) => { $(document).on("ajax_after_post", (_, xhr_body) => {
if (kIsEnabled.getValue() && xhr_body != null) { if (kIsEnabled.getValue() && xhr_body != null) {
const thread = LCNThread.first()
const dom = parser.parseFromString(xhr_body.thread, "text/html") const dom = parser.parseFromString(xhr_body.thread, "text/html")
updateThreadFn(LCNThread.first(), dom) updateThreadFn(thread, dom)
updateSecondsByTSLP(thread.getReplies().at(-1).getInfo())
} }
}) })