Add version information

This commit is contained in:
toasted-nutbread 2019-09-28 13:42:48 -04:00
parent b42fa9581f
commit 1a8cb78391
2 changed files with 16 additions and 1 deletions

View File

@ -240,6 +240,8 @@ async function onFormOptionsChanged(e) {
}
async function onReady() {
showExtensionInformation();
formSetupEventListeners();
await profileOptionsSetup();
@ -741,3 +743,16 @@ function storageSpinnerShow(show) {
spinner.hide();
}
}
/*
* Information
*/
function showExtensionInformation() {
const node = document.getElementById('extension-info');
if (node === null) { return; }
const manifest = chrome.runtime.getManifest();
node.textContent = `${manifest.name} v${manifest.version}`;
}

View File

@ -534,7 +534,7 @@
<pre id="debug"></pre>
<div class="pull-right bottom-links">
<small><a href="search.html">Search</a> &bull; <a href="https://foosoft.net/projects/yomichan/" target="_blank" rel="noopener">Homepage</a> &bull; <a href="legal.html">Legal</a></small>
<small><span id="extension-info"></span> &bull; <a href="search.html">Search</a> &bull; <a href="https://foosoft.net/projects/yomichan/" target="_blank" rel="noopener">Homepage</a> &bull; <a href="legal.html">Legal</a></small>
</div>
</div>