()
| 39 | }); |
| 40 | |
| 41 | async function init(): Promise<void | false> { |
| 42 | const changelog = await changelogName.get(getRepo()!.nameWithOwner); |
| 43 | if (!changelog) { |
| 44 | return false; |
| 45 | } |
| 46 | |
| 47 | const releasesOrTagsNavbarSelector = [ |
| 48 | 'nav[aria-label^="Releases and Tags"]', // Release list |
| 49 | '.subnav-links', // Tag list |
| 50 | ]; |
| 51 | |
| 52 | const navbar = await elementReady(releasesOrTagsNavbarSelector); |
| 53 | navbar!.append( |
| 54 | tooltipped( |
| 55 | {label: `View the ${changelog} file`, direction: 'n'}, |
| 56 | <a |
| 57 | className="subnav-item" |
| 58 | href={buildRepoUrl('blob', 'HEAD', changelog)} |
| 59 | > |
| 60 | <span>Changelog</span> |
| 61 | </a>, |
| 62 | ), |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | void features.add(import.meta.url, { |
| 67 | include: [ |
nothing calls this directly
no test coverage detected