mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-16 06:13:16 +00:00
Prepare subrelease notification (developer mode)
This commit is contained in:
parent
f37224dbc0
commit
171f66b03e
@ -379,7 +379,10 @@ ext_api.runtime.onInstalled.addListener(function (details) {
|
|||||||
if (details.reason == "install") {
|
if (details.reason == "install") {
|
||||||
setDefaultOptions();
|
setDefaultOptions();
|
||||||
} else if (details.reason == "update") {
|
} else if (details.reason == "update") {
|
||||||
ext_api.runtime.openOptionsPage(); // User updated extension
|
ext_api.management.getSelf(function (result) {
|
||||||
|
if (result.installType !== 'development')
|
||||||
|
ext_api.runtime.openOptionsPage(); // User updated extension (non-developer mode)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -9,8 +9,11 @@ fetch(manifest_new)
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
response.json().then(json => {
|
response.json().then(json => {
|
||||||
|
ext_api.management.getSelf(function (result) {
|
||||||
|
var installType = result.installType;
|
||||||
|
var version_len = (installType === 'development') ? 7 : 5;
|
||||||
var version_new = json['version'];
|
var version_new = json['version'];
|
||||||
if (version_new > manifestData.version) {
|
if (version_new.substring(0, version_len) > manifestData.version.substring(0, version_len)) {
|
||||||
var versionString_new = document.getElementById('version_new');
|
var versionString_new = document.getElementById('version_new');
|
||||||
versionString_new.appendChild(document.createTextNode(' * '));
|
versionString_new.appendChild(document.createTextNode(' * '));
|
||||||
var anchorEl = document.createElement('a');
|
var anchorEl = document.createElement('a');
|
||||||
@ -19,6 +22,7 @@ fetch(manifest_new)
|
|||||||
anchorEl.target = '_blank';
|
anchorEl.target = '_blank';
|
||||||
versionString_new.appendChild(anchorEl);
|
versionString_new.appendChild(anchorEl);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user