mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
Merge branch 'development' into production
This commit is contained in:
commit
029f80633d
|
@ -533,17 +533,23 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('Updating from', oldStorage.version, 'to', antiCensorRu.version);
|
console.log('Updating from', oldStorage.version, 'to', antiCensorRu.version);
|
||||||
|
try {
|
||||||
if (window.apis.version.isLeq(oldStorage.version, '0.0.1.5')) {
|
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();
|
||||||
|
if (modsMutated) {
|
||||||
modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']);
|
modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']);
|
||||||
await new Promise(
|
await new Promise(
|
||||||
(resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve),
|
(resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Swallow update error.
|
||||||
|
}
|
||||||
ifUpdatedCb();
|
ifUpdatedCb();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,7 +12,7 @@ const pacUrls = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const commonContext = {
|
const commonContext = {
|
||||||
version: '1.6',
|
version: '1.10',
|
||||||
anticensorityPacUrls: [
|
anticensorityPacUrls: [
|
||||||
...pacUrls,
|
...pacUrls,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user