mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
21: fix typo, swallow ip error, force antizapret
This commit is contained in:
parent
16d8e959f1
commit
8441fd956e
|
@ -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: '',
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
(res.headers.get('Last-Modified') || wasModified)
|
||||
);
|
||||
},
|
||||
errorsLib.clarifyThen(checkCon, (err) => cb(err, wasModifed))
|
||||
errorsLib.clarifyThen(checkCon, (err) => cb(err, wasModified))
|
||||
);
|
||||
|
||||
},
|
||||
|
|
|
@ -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.');
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user