* Updates the number of stars displayed for a post.
(postElement: HTMLElement, nbStart: number)
| 369 | * Updates the number of stars displayed for a post. |
| 370 | */ |
| 371 | function updateStarCount(postElement: HTMLElement, nbStart: number) { |
| 372 | ( |
| 373 | postElement.getElementsByClassName('star-count')[0] as HTMLElement |
| 374 | ).innerText = nbStart.toString(); |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * Creates a comment element and adds it to the given postElement. |