Get version information from manifest on option page

This commit is contained in:
sienori 2018-06-03 01:40:30 +09:00
parent 47d589a515
commit 7bb911a6e9
2 changed files with 3 additions and 2 deletions

View file

@ -304,11 +304,11 @@
<ul> <ul>
<li> <li>
<div class=optionContainer> <div class=optionContainer>
<div class=optionText> <div class="optionText addonVersion">
<p>Simple Translate</p> <p>Simple Translate</p>
<p class="caption"> <p class="caption">
<a class=pageLink href="https://github.com/sienori/simple-translate/releases" target="_blank"> <a class=pageLink href="https://github.com/sienori/simple-translate/releases" target="_blank">
Version. 1.7.3</a> Version</a>
</p> </p>
</div> </div>
</div> </div>

View file

@ -44,3 +44,4 @@ function readHash(e) {
document.getElementsByClassName("addonUrl")[0].href = browser.i18n.getMessage("addonUrl"); document.getElementsByClassName("addonUrl")[0].href = browser.i18n.getMessage("addonUrl");
document.getElementsByClassName("amazonUrl")[0].href = browser.i18n.getMessage("amazonUrl"); document.getElementsByClassName("amazonUrl")[0].href = browser.i18n.getMessage("amazonUrl");
document.getElementsByClassName('addonVersion')[0].getElementsByClassName('caption')[0].getElementsByTagName('a')[0].innerText = `Version ${browser.runtime.getManifest().version}`;