2019-01-06 02:04:40 +01:00
|
|
|
var manifestData = browser.runtime.getManifest();
|
|
|
|
var versionString = 'v' + manifestData.version;
|
2020-02-21 18:49:49 +01:00
|
|
|
document.getElementById('version').innerText = versionString;
|
|
|
|
|
|
|
|
const manifest_new = 'https://raw.githubusercontent.com/magnolia1234/bypass-paywalls-firefox-clean/master/manifest.json';
|
|
|
|
fetch(manifest_new)
|
|
|
|
.then(response => {
|
|
|
|
if (response.ok) {
|
|
|
|
response.json().then(json => {
|
|
|
|
var version_new = json['version'];
|
|
|
|
if (version_new > manifestData.version) {
|
2020-03-08 19:45:19 +01:00
|
|
|
versionString_new = ' | New release v' + version_new.link("https://github.com/magnolia1234/bypass-paywalls-firefox-clean/releases").replace('a href=', 'a target="_blank" href=');
|
2020-02-21 18:49:49 +01:00
|
|
|
} else {
|
2020-03-06 13:53:16 +01:00
|
|
|
versionString_new = ''; //'Latest release';
|
2020-02-21 18:49:49 +01:00
|
|
|
}
|
2020-03-06 13:53:16 +01:00
|
|
|
document.getElementById('version_new').innerHTML = versionString_new;
|
2020-02-21 18:49:49 +01:00
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|