Restyle, fix old update bug

This commit is contained in:
Ilya Ig. Petrov 2017-10-31 17:18:53 +05:00
parent 98cbd5fd02
commit 56a0daf635
2 changed files with 7 additions and 2 deletions

View File

@ -526,7 +526,7 @@
// UPDATE & MIGRATION // UPDATE & MIGRATION
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 (oldStorage.version === ' 0.0.1.2') { if (oldStorage.version === '0.0.1.2') {
if (key !== null && key !== 'onlyOwnSites') { if (key !== null && key !== 'onlyOwnSites') {
antiCensorRu._currentPacProviderKey = 'Антицензорити'; antiCensorRu._currentPacProviderKey = 'Антицензорити';
} }

View File

@ -158,7 +158,12 @@ export default function getProxyEditor(theState) {
return true; return true;
}; };
const splitBySemi = (proxyString) => proxyString.replace(/#.*$/mg, '').trim().split(/\s*;\s*/g).filter((s) => s); const splitBySemi = (proxyString) => proxyString
.replace(/#.*$/mg, '')
.trim()
.split(/\s*;\s*/g)
.filter((s) => s);
const joinBySemi = (strs) => strs.join(';\n') + ';'; const joinBySemi = (strs) => strs.join(';\n') + ';';
const normalizeProxyString = (str) => joinBySemi(splitBySemi(str)); const normalizeProxyString = (str) => joinBySemi(splitBySemi(str));