Update info (#1108)
* Show language * Show extension manifest name + version
This commit is contained in:
parent
14b9e0621b
commit
dabe5fa899
@ -30,6 +30,7 @@
|
||||
<li>Extension version: <span id="version"></span></li>
|
||||
<li>Platform: <span id="platform"></span></li>
|
||||
<li>Browser: <span id="browser"></span></li>
|
||||
<li>Language: <span id="language"></span></li>
|
||||
<li>User agent: <span id="user-agent"></span></li>
|
||||
<li>AnkiConnect version: <span id="anki-connect-version-container"><span id="anki-connect-version">...</span><em class="light" id="anki-connect-version-unknown-message" hidden> (Anki not running or connected)</em></span></li>
|
||||
<li>Installed dictionaries: <span id="installed-dictionaries">...</span><em id="installed-dictionaries-none" hidden>None installed</em></li>
|
||||
|
@ -50,20 +50,22 @@ function getOperatingSystemDisplayName(os) {
|
||||
document.querySelector('#content-scroll-focus').focus();
|
||||
|
||||
const manifest = chrome.runtime.getManifest();
|
||||
const language = chrome.i18n.getUILanguage();
|
||||
|
||||
api.forwardLogsToBackend();
|
||||
await yomichan.prepare();
|
||||
|
||||
const {userAgent} = navigator;
|
||||
const {version} = manifest;
|
||||
const {name, version} = manifest;
|
||||
const {browser, platform: {os}} = await api.getEnvironmentInfo();
|
||||
|
||||
const thisVersionLink = document.querySelector('#release-notes-this-version-link');
|
||||
thisVersionLink.href = thisVersionLink.dataset.hrefFormat.replace(/\{version\}/g, version);
|
||||
|
||||
document.querySelector('#version').textContent = `${version}`;
|
||||
document.querySelector('#version').textContent = `${name} ${version}`;
|
||||
document.querySelector('#browser').textContent = getBrowserDisplayName(browser);
|
||||
document.querySelector('#platform').textContent = getOperatingSystemDisplayName(os);
|
||||
document.querySelector('#language').textContent = `${language}`;
|
||||
document.querySelector('#user-agent').textContent = userAgent;
|
||||
|
||||
(async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user