Ready for migration of custom proxies format

This commit is contained in:
Ilya Ig. Petrov 2017-10-31 17:47:01 +05:00
parent b0f826dab6
commit 15e95d6e07

View File

@ -525,11 +525,14 @@
// UPDATE & MIGRATION
console.log('Updating from', oldStorage.version, 'to', antiCensorRu.version);
const key = antiCensorRu._currentPacProviderKey;
if (oldStorage.version === '0.0.1.2') {
if (key !== null && key !== 'onlyOwnSites') {
antiCensorRu._currentPacProviderKey = 'Антицензорити';
}
if (window.apis.version.isLeq(oldStorage.version, '0.0.1.5')) {
// Change semicolons to newlines in proxy string (raw).
// TODO:
const modsMutated = window.apis.pacKitchen.getPacMods();
modsMutated['customProxyStringRaw'] = MIGRATE(conf.value);
window.apis.pacKitchen.keepCookedNowAsync(modsMutated, cb);
}
antiCensorRu.pushToStorageAsync(() => {