Fix getting extension version in the popup

This commit is contained in:
Tamius Han 2020-03-02 22:35:34 +01:00
parent 1c978e61b7
commit 77ee6be218
3 changed files with 8 additions and 11 deletions

View File

@ -52,14 +52,15 @@ class Settings {
}
}
getExtensionVersion() {
static getExtensionVersion() {
if (currentBrowser.firefox) {
return browser.runtime.getManifest().version;
} else if (currentBrowser.chrome) {
return chrome.runtime.getManifest().version;
} else if (currentBrowser.edge) {
return browser.runtime.getManifest().version;
}
}
}
getExtensionVersion() {
return Settings.getExtensionVersion();
}
compareExtensionVersions(a, b) {

View File

@ -33,10 +33,12 @@
<script>
import BrowserDetect from '../ext/conf/BrowserDetect';
import Settings from '../ext/lib/Settings';
export default {
data() {
return {
addonVersion: browser.runtime.getManifest().version || chrome.runtime.getManifest().version,
addonVersion: Settings.getVersion(),
mailtoLink: 'mailto:tamius.han@gmail.com',
redditLink: '',
}

View File

@ -48,12 +48,6 @@ export default {
data() {
return {
addonVersion: browser.runtime.getManifest().version || chrome.runtime.getManifest().version,
mailtoLink: 'mailto:tamius.han@gmail.com',
redditLink: '',
}
},
data() {
return {
loggingEnabled: false,
loggerSettings: '',
loggerSettingsError: false,