mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
Make provider forcing on update unnecessary
This commit is contained in:
parent
cc9b202046
commit
41a40bc388
|
@ -498,12 +498,14 @@
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// UPDATE & MIGRATION
|
// UPDATE & MIGRATION
|
||||||
|
console.log('Updating from ', oldStorage.version, 'to', antiCensorRu.version);
|
||||||
const key = antiCensorRu._currentPacProviderKey;
|
const key = antiCensorRu._currentPacProviderKey;
|
||||||
if (key !== null) {
|
if (key !== null) {
|
||||||
const ifVeryOld = !Object.keys(antiCensorRu.pacProviders).includes(key);
|
const ifVeryOld = !Object.keys(antiCensorRu.pacProviders).includes(key);
|
||||||
const ifWasForced = localStorage.getItem('provider-backup');
|
const ifNeedsForcing = (oldStorage.version < '0.0.0.2') && !localStorage.getItem('provider-backup');
|
||||||
if ( ifVeryOld || !ifWasForced ) {
|
if ( ifVeryOld || ifNeedsForcing ) {
|
||||||
if (!ifWasForced) {
|
if (ifNeedsForcing) {
|
||||||
|
console.log('Update forces antizapret...')
|
||||||
localStorage.setItem('provider-backup', antiCensorRu._currentPacProviderKey);
|
localStorage.setItem('provider-backup', antiCensorRu._currentPacProviderKey);
|
||||||
}
|
}
|
||||||
antiCensorRu._currentPacProviderKey = 'Антизапрет';
|
antiCensorRu._currentPacProviderKey = 'Антизапрет';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user