Merge branch 'development' into production

This commit is contained in:
Ilya Ig. Petrov 2017-11-12 08:31:56 +05:00
commit 029f80633d
2 changed files with 15 additions and 9 deletions

View File

@ -533,16 +533,22 @@
}); });
console.log('Updating from', oldStorage.version, 'to', antiCensorRu.version); console.log('Updating from', oldStorage.version, 'to', antiCensorRu.version);
if (window.apis.version.isLeq(oldStorage.version, '0.0.1.5')) { try {
if (window.apis.version.isLeq(oldStorage.version, '0.0.1.5')) {
// Change semicolons to semicolons followed by newlines in proxy string (raw). // Change semicolons to semicolons followed by newlines in proxy string (raw).
const migrateProxies = (oldStr) => oldStr.replace(/;\\r?\\n?/g, ';\\n'); const migrateProxies = (oldStr) => oldStr.replace(/;\\r?\\n?/g, ';\\n');
const modsMutated = window.apis.pacKitchen.getPacModsRaw(); const modsMutated = window.apis.pacKitchen.getPacModsRaw();
modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']); if (modsMutated) {
await new Promise( modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']);
(resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve), await new Promise(
); (resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve),
);
}
}
} catch (e) {
// Swallow update error.
} }
ifUpdatedCb(); ifUpdatedCb();

View File

@ -12,7 +12,7 @@ const pacUrls = [
]; ];
const commonContext = { const commonContext = {
version: '1.6', version: '1.10',
anticensorityPacUrls: [ anticensorityPacUrls: [
...pacUrls, ...pacUrls,
], ],