2020-03-10 18:36:30 +00:00
|
|
|
var manifestData = browser.runtime.getManifest();
|
2019-01-06 01:04:40 +00:00
|
|
|
var versionString = 'v' + manifestData.version;
|
2020-02-21 17:49:49 +00: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-10 18:13:42 +00:00
|
|
|
var versionString_new = document.getElementById('version_new');
|
|
|
|
versionString_new.appendChild(document.createTextNode(' | '));
|
|
|
|
var anchorEl = document.createElement('a');
|
|
|
|
anchorEl.text = 'New release v' + version_new;
|
|
|
|
anchorEl.href = 'https://github.com/magnolia1234/bypass-paywalls-firefox-clean/releases';
|
|
|
|
anchorEl.target = '_blank';
|
|
|
|
versionString_new.appendChild(anchorEl);
|
2020-02-21 17:49:49 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|