js/lcn/classes.js: add LCNThread.getReplies

This commit is contained in:
Jon 2024-02-20 18:50:13 +00:00 committed by towards-a-new-leftypol
parent 45727f6a51
commit 4bb7c3ef0f
1 changed files with 1 additions and 0 deletions

View File

@ -179,6 +179,7 @@ globalThis.LCNThread = class LCNThread {
"getThread" () { return this.#thread; }
"getOP" () { return this.#op; }
"getPosts" () { return Array.prototype.map.apply(this.#thread.querySelectorAll(".post"), [ el => LCNPost.assign(el) ]); }
"getReplies" () { return Array.prototype.map.apply(this.#thread.querySelectorAll(".post:not(.op)"), [ el => LCNPost.assign(el) ]); }
"getParent" () { return this.#parent; }
"__setParent" (inst) { return this.#parent = inst; }