2020-03-25 18:31:28 +00:00
|
|
|
var ext_api = chrome || browser;
|
|
|
|
|
|
|
|
var manifestData = ext_api.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;
|
|
|
|
|
2020-04-28 17:53:49 +00:00
|
|
|
const manifest_new = 'https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/raw/master/manifest.json';
|
2020-02-21 17:49:49 +00:00
|
|
|
fetch(manifest_new)
|
2020-03-25 18:31:28 +00:00
|
|
|
.then(response => {
|
|
|
|
if (response.ok) {
|
|
|
|
response.json().then(json => {
|
|
|
|
var version_new = json['version'];
|
|
|
|
if (version_new > manifestData.version) {
|
|
|
|
var versionString_new = document.getElementById('version_new');
|
2020-04-23 19:45:47 +00:00
|
|
|
versionString_new.appendChild(document.createTextNode(' * '));
|
2020-03-25 18:31:28 +00:00
|
|
|
var anchorEl = document.createElement('a');
|
|
|
|
anchorEl.text = 'New release v' + version_new;
|
2020-04-27 19:59:50 +00:00
|
|
|
anchorEl.href = 'https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads';
|
2020-03-25 18:31:28 +00:00
|
|
|
anchorEl.target = '_blank';
|
|
|
|
versionString_new.appendChild(anchorEl);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|