MCPcopy
hub / github.com/refined-github/refined-github / setVersion

Function setVersion

source/features/rgh-improve-new-issue-form.tsx:79–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79async 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
98function checkVersionAge(): void {
99 const releaseDate = getExtensionReleaseDate();

Callers 1

initFunction · 0.85

Calls 4

delayFunction · 0.85
setReactInputValueFunction · 0.85
getTokenFunction · 0.85

Tested by

no test coverage detected