(titleText: string, filePath: string)
| 163 | } |
| 164 | |
| 165 | function updateModalTitle(titleText: string, filePath: string): void { |
| 166 | const title = document.getElementById("modal-title"); |
| 167 | if (title) { |
| 168 | title.textContent = titleText; |
| 169 | } |
| 170 | |
| 171 | const fileName = getFileName(filePath); |
| 172 | document.title = |
| 173 | titleText === fileName |
| 174 | ? `${titleText} | Awesome GitHub Copilot` |
| 175 | : `${titleText} · ${fileName} | Awesome GitHub Copilot`; |
| 176 | } |
| 177 | |
| 178 | function getModalBody(): HTMLElement | null { |
| 179 | return document.querySelector<HTMLElement>(".modal-body"); |
no test coverage detected