mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 20:03:45 +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!'));
|
return cb(new PluginError(PluginName, 'Streams not supported!'));
|
||||||
} else if (file.isBuffer()) {
|
} 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]) => {
|
const {keys, values} = Object.entries(context).reduce( (acc, [key, value]) => {
|
||||||
|
|
||||||
acc.keys.push(key);
|
acc.keys.push(key);
|
||||||
|
@ -56,7 +50,7 @@ gulp.task('clean', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fullContext = {
|
const fullContext = {
|
||||||
version: '0.20',
|
version: '0.21',
|
||||||
nameSuffixEn: '',
|
nameSuffixEn: '',
|
||||||
nameSuffixRu: '',
|
nameSuffixRu: '',
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
(res.headers.get('Last-Modified') || wasModified)
|
(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...',
|
'Getting IPs for PAC hosts...',
|
||||||
cb
|
cb
|
||||||
);
|
);
|
||||||
window.utils.fireEvent('ip-to-host-update-all', throwIfError);
|
window.utils.fireEvent('ip-to-host-update-all', () => {/* Swallow. */});
|
||||||
cb();
|
cb();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -500,11 +500,15 @@
|
||||||
|
|
||||||
// UPDATE & MIGRATION
|
// UPDATE & MIGRATION
|
||||||
const key = antiCensorRu._currentPacProviderKey;
|
const key = antiCensorRu._currentPacProviderKey;
|
||||||
if (
|
if (key !== null) {
|
||||||
key !== null &&
|
const ifVeryOld = !Object.keys(antiCensorRu.pacProviders).includes(key);
|
||||||
!Object.keys(antiCensorRu.pacProviders).includes(key)
|
const ifWasForced = localStorage.getItem('provider-backup');
|
||||||
) {
|
if ( ifVeryOld || !ifWasForced ) {
|
||||||
antiCensorRu._currentPacProviderKey = 'Антицензорити';
|
if (!ifWasForced) {
|
||||||
|
localStorage.setItem('provider-backup', antiCensorRu._currentPacProviderKey);
|
||||||
|
}
|
||||||
|
antiCensorRu._currentPacProviderKey = 'Антизапрет';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
console.log('Extension updated.');
|
console.log('Extension updated.');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user