diff --git a/extensions/chromium/runet-censorship-bypass/gulpfile.js b/extensions/chromium/runet-censorship-bypass/gulpfile.js index 9f4b6d2..c1c1b55 100644 --- a/extensions/chromium/runet-censorship-bypass/gulpfile.js +++ b/extensions/chromium/runet-censorship-bypass/gulpfile.js @@ -19,12 +19,6 @@ const templatePlugin = (context) => through.obj(function(file, encoding, cb) { return cb(new PluginError(PluginName, 'Streams not supported!')); } else if (file.isBuffer()) { - const stringsContext = new Proxy(context, { - get: function(target, prop) { - return target[prop] || ''; - }, - }); - const {keys, values} = Object.entries(context).reduce( (acc, [key, value]) => { acc.keys.push(key); @@ -56,7 +50,7 @@ gulp.task('clean', function() { }); const fullContext = { - version: '0.20', + version: '0.21', nameSuffixEn: '', nameSuffixRu: '', }; diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/13-http-lib.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/13-http-lib.js index 444f767..4fbe0ec 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/13-http-lib.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/13-http-lib.js @@ -31,7 +31,7 @@ (res.headers.get('Last-Modified') || wasModified) ); }, - errorsLib.clarifyThen(checkCon, (err) => cb(err, wasModifed)) + errorsLib.clarifyThen(checkCon, (err) => cb(err, wasModified)) ); }, diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/17-sync-pac-script-with-pac-provider-api.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/17-sync-pac-script-with-pac-provider-api.js index ba25def..559873b 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/17-sync-pac-script-with-pac-provider-api.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/17-sync-pac-script-with-pac-provider-api.js @@ -93,7 +93,7 @@ 'Getting IPs for PAC hosts...', cb ); - window.utils.fireEvent('ip-to-host-update-all', throwIfError); + window.utils.fireEvent('ip-to-host-update-all', () => {/* Swallow. */}); cb(); }; @@ -500,11 +500,15 @@ // UPDATE & MIGRATION const key = antiCensorRu._currentPacProviderKey; - if ( - key !== null && - !Object.keys(antiCensorRu.pacProviders).includes(key) - ) { - antiCensorRu._currentPacProviderKey = 'Антицензорити'; + if (key !== null) { + const ifVeryOld = !Object.keys(antiCensorRu.pacProviders).includes(key); + const ifWasForced = localStorage.getItem('provider-backup'); + if ( ifVeryOld || !ifWasForced ) { + if (!ifWasForced) { + localStorage.setItem('provider-backup', antiCensorRu._currentPacProviderKey); + } + antiCensorRu._currentPacProviderKey = 'Антизапрет'; + } } console.log('Extension updated.');