Optional PSA conditioned on version

This commit is contained in:
JannisX11 2020-07-26 18:03:16 +02:00
parent 8f0fa7c2e8
commit ac27b7573d

View File

@ -588,7 +588,18 @@ function addStartScreenSection(id, data) {
addStartScreenSection(data.new_version)
}
if (data.psa) {
addStartScreenSection(data.psa)
(function() {
if (typeof data.psa.version == 'string') {
if (data.psa.version.includes('-')) {
limits = data.psa.version.split('-');
if (limits[0] && compareVersions(limits[0], Blockbench.version)) return;
if (limits[1] && compareVersions(Blockbench.version, limits[1])) return;
} else {
if (data.psa.version != Blockbench.version) return;
}
}
addStartScreenSection(data.psa)
})()
}
})