21: fix typo, swallow ip error, force antizapret

This commit is contained in:
Ilya Ig. Petrov 2017-02-23 02:33:21 +00:00
parent 16d8e959f1
commit 8441fd956e
3 changed files with 12 additions and 14 deletions

View File

@ -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: '',
};

View File

@ -31,7 +31,7 @@
(res.headers.get('Last-Modified') || wasModified)
);
},
errorsLib.clarifyThen(checkCon, (err) => cb(err, wasModifed))
errorsLib.clarifyThen(checkCon, (err) => cb(err, wasModified))
);
},

View File

@ -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.');