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