diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js index 78d2127..9c07766 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js @@ -533,16 +533,22 @@ }); 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). - const migrateProxies = (oldStr) => oldStr.replace(/;\\r?\\n?/g, ';\\n'); - const modsMutated = window.apis.pacKitchen.getPacModsRaw(); - modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']); - await new Promise( - (resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve), - ); + // Change semicolons to semicolons followed by newlines in proxy string (raw). + const migrateProxies = (oldStr) => oldStr.replace(/;\\r?\\n?/g, ';\\n'); + const modsMutated = window.apis.pacKitchen.getPacModsRaw(); + if (modsMutated) { + modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']); + await new Promise( + (resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve), + ); + } + } + } catch (e) { + // Swallow update error. } ifUpdatedCb(); diff --git a/extensions/chromium/runet-censorship-bypass/src/templates-data.js b/extensions/chromium/runet-censorship-bypass/src/templates-data.js index 230be9f..3fe3be8 100644 --- a/extensions/chromium/runet-censorship-bypass/src/templates-data.js +++ b/extensions/chromium/runet-censorship-bypass/src/templates-data.js @@ -12,7 +12,7 @@ const pacUrls = [ ]; const commonContext = { - version: '1.6', + version: '1.10', anticensorityPacUrls: [ ...pacUrls, ],