(link: HTMLAnchorElement)
| 13 | import observe from '../helpers/selector-observer.js'; |
| 14 | |
| 15 | async function dropExtraCopy(link: HTMLAnchorElement): Promise<void> { |
| 16 | // Drop 'commented' label to shorten the copy |
| 17 | const commentedNode = link.parentNode!.nextSibling; |
| 18 | if (closestElementOptional('.timeline-comment-header', link) && commentedNode) { |
| 19 | // "left a comment" appears in the main comment of reviews |
| 20 | removeTextNodeContaining(commentedNode, /commented|left a comment/); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | function createElement(element: HTMLAnchorElement, fullName: string): JSX.Element { |
| 25 | const nameElement = ( |
no test coverage detected