Make Anticensority script default, switch to it on update

This commit is contained in:
Ilya Ig. Petrov 2017-08-26 21:45:59 +05:00
parent 85b8dec3b3
commit b81a7d95ac

View File

@ -221,7 +221,7 @@
}, },
_currentPacProviderKey: 'Антизапрет', _currentPacProviderKey: 'Антицензорити',
/* Is it the first time extension installed? /* Is it the first time extension installed?
Do something, e.g. initiate PAC sync. Do something, e.g. initiate PAC sync.
@ -541,10 +541,7 @@
console.log('Updating from ', oldStorage.version, 'to', antiCensorRu.version); 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); antiCensorRu._currentPacProviderKey = 'Антицензорити';
if (ifVeryOld) {
antiCensorRu._currentPacProviderKey = 'Антизапрет';
}
} }
antiCensorRu.pushToStorageAsync(() => { antiCensorRu.pushToStorageAsync(() => {