Fix buggy update logic

This commit is contained in:
ilyaigpetrov 2023-05-05 18:39:21 +05:00
parent ae930da8b3
commit b3096c8d83

View File

@ -679,13 +679,14 @@
console.log('Updating from', oldAntiCensorRu.version, 'to', antiCensorRu.version); console.log('Updating from', oldAntiCensorRu.version, 'to', antiCensorRu.version);
try { try {
if (window.apis.version.isLeq(oldAntiCensorRu.version, '0.0.1.57')) { if (window.apis.version.isLeq(oldAntiCensorRu.version, '0.0.1.59')) {
const azWithPort = 'https://antizapret.prostovpn.org:8443/proxy.pac'; window.apis.antiCensorRu.pacProviders['Антизапрет'].pacUrls = [
const azWithPortAlt = 'https://antizapret.prostovpn.org:18443/proxy.pac'; 'https://antizapret.prostovpn.org:8443/proxy.pac',
const urls = window.apis.antiCensorRu.pacProviders['Антизапрет'].pacUrls; 'https://antizapret.prostovpn.org:18443/proxy.pac',
urls[0] = 'https://antizapret.prostovpn.org/proxy.pac'; 'https://antizapret.prostovpn.org/proxy.pac',
urls.unshift(azWithPort, azWithPortAlt); 'https://rebrand.ly/ac-antizapret-pac',
console.log('Successfully updated to 0.0.1.58.'); ];
console.log('Successfully updated to 0.0.1.60.');
} }
} catch (e) { } catch (e) {
// Log update error. // Log update error.