bypass-paywalls-firefox-clean/version.js
magnolia1234 7e28649506 Update custom sites UI (export/import)
Import custom sites only works from add-ons screen (via icon/popup gives CSP-error).
Plus some cosmetic updates in options.
2020-03-08 19:45:19 +01:00

20 lines
807 B
JavaScript

var manifestData = browser.runtime.getManifest();
var versionString = 'v' + manifestData.version;
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) {
versionString_new = ' | New release v' + version_new.link("https://github.com/magnolia1234/bypass-paywalls-firefox-clean/releases").replace('a href=', 'a target="_blank" href=');
} else {
versionString_new = ''; //'Latest release';
}
document.getElementById('version_new').innerHTML = versionString_new;
})
}
});