(label: HTMLElement)
| 21 | ]); |
| 22 | |
| 23 | function alterLink(label: HTMLElement): void { |
| 24 | for (const [text, filter] of reviewStateFilters) { |
| 25 | // Use .textContent because "Draft" lacks any unique attributes |
| 26 | if (label.textContent.trim() !== text) { |
| 27 | continue; |
| 28 | } |
| 29 | |
| 30 | const url = new SearchQuery(buildRepoUrl('pulls')).append(filter).href; |
| 31 | if (label instanceof HTMLAnchorElement) { |
| 32 | label.href = url; |
| 33 | continue; |
| 34 | } |
| 35 | |
| 36 | wrap(label, <a href={url} />); |
| 37 | $('[class*="statusText"]', label).classList.add('Link--onHover'); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | function init(signal: AbortSignal): void { |
| 42 | observe( |
nothing calls this directly
no test coverage detected