(element: HTMLAnchorElement, fullName: string)
| 59 | } |
| 60 | |
| 61 | function appendName(element: HTMLAnchorElement, fullName: string): void { |
| 62 | // If it's a regular comment author, add it outside <strong> otherwise it's something like "User added some commits" |
| 63 | const {parentElement} = element; |
| 64 | const insertionPoint = parentElement!.tagName === 'STRONG' ? parentElement! : element; |
| 65 | |
| 66 | // React might create a new label without removing the old one |
| 67 | // https://github.com/refined-github/refined-github/issues/8478 |
| 68 | attachElement(insertionPoint, {after: () => createElement(element, fullName)}); |
| 69 | } |
| 70 | |
| 71 | async function updateLinks(found: HTMLAnchorElement[]): Promise<void> { |
| 72 | const users = Map.groupBy( |
no test coverage detected