* Deletes the comment of the given ID in the given postElement.
(postElement: HTMLElement, id: string)
| 417 | * Deletes the comment of the given ID in the given postElement. |
| 418 | */ |
| 419 | function deleteComment(postElement: HTMLElement, id: string) { |
| 420 | const comment = postElement.getElementsByClassName('comment-' + id)[0]; |
| 421 | comment.parentElement!.removeChild(comment); |
| 422 | } |
| 423 | |
| 424 | /** |
| 425 | * Starts listening for new posts and populates posts lists. |