()
| 77 | } |
| 78 | |
| 79 | async function setVersion(): Promise<void> { |
| 80 | // Wait for GitHub's listener to be attached #9293 |
| 81 | await delay(1000); |
| 82 | |
| 83 | const field = getElementByAriaLabelledBy<HTMLInputElement>( |
| 84 | 'span[class^="TextInputElement-module__issueFormTextField"] > input', |
| 85 | 'Extension version*', |
| 86 | ); |
| 87 | |
| 88 | const {version} = chrome.runtime.getManifest(); |
| 89 | setReactInputValue(field, version); |
| 90 | |
| 91 | if (!await getToken()) { |
| 92 | // Mark the submission as not having a token set up because people have a tendency to go through forms and read absolutely nothing. This makes it easier to spot liars. |
| 93 | setReactInputValue(field, '(' + version + ')'); |
| 94 | field.disabled = true; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | function checkVersionAge(): void { |
| 99 | const releaseDate = getExtensionReleaseDate(); |
no test coverage detected