* Sets the comment's values in the given postElement.
( postElement: HTMLElement, id: string, text: string, author: string, )
| 401 | * Sets the comment's values in the given postElement. |
| 402 | */ |
| 403 | function setCommentValues( |
| 404 | postElement: HTMLElement, |
| 405 | id: string, |
| 406 | text: string, |
| 407 | author: string, |
| 408 | ) { |
| 409 | const comment = postElement.getElementsByClassName('comment-' + id)[0]; |
| 410 | (comment.getElementsByClassName('comment')[0] as HTMLElement).innerText = |
| 411 | text; |
| 412 | (comment.getElementsByClassName('fp-username')[0] as HTMLElement).innerText = |
| 413 | author; |
| 414 | } |
| 415 | |
| 416 | /** |
| 417 | * Deletes the comment of the given ID in the given postElement. |