mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-16 06:13:16 +00:00
24 lines
1.0 KiB
JavaScript
24 lines
1.0 KiB
JavaScript
var ext_api = chrome || browser;
|
|
|
|
var manifestData = ext_api.runtime.getManifest();
|
|
var versionString = 'v' + manifestData.version;
|
|
document.getElementById('version').innerText = versionString;
|
|
|
|
const manifest_new = 'https://raw.githubusercontent.com/magnolia1234-new/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) {
|
|
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-new/bypass-paywalls-firefox-clean/releases';
|
|
anchorEl.target = '_blank';
|
|
versionString_new.appendChild(anchorEl);
|
|
}
|
|
})
|
|
}
|
|
}); |