mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-10 19:46:34 +03:00
Don't clear settings that are not set by us
This commit is contained in:
parent
97ba2697da
commit
99a4ff9d24
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
console.log('Extension started.');
|
||||
|
||||
{
|
||||
|
||||
const IF_DEBUG = true;
|
||||
|
|
|
@ -65,6 +65,11 @@
|
|||
reject(getErr);
|
||||
return;
|
||||
}
|
||||
const ifWeAreInControl = window.utils.areSettingsControlledFor(settings);
|
||||
if (!ifWeAreInControl) {
|
||||
resolve(createPromise());
|
||||
return;
|
||||
}
|
||||
delete settings.levelOfControl;
|
||||
const setProxyAsync = () => new Promise((setResolve, setReject) => {
|
||||
|
||||
|
@ -80,7 +85,7 @@
|
|||
reject(clearErr);
|
||||
return;
|
||||
}
|
||||
return createPromise().then((actionResult) => setProxyAsync().then(() => resolve(actionResult)));
|
||||
createPromise().then((actionResult) => setProxyAsync().then(() => resolve(actionResult)));
|
||||
}));
|
||||
}));
|
||||
});
|
||||
|
@ -168,7 +173,7 @@
|
|||
|
||||
}
|
||||
|
||||
console.log('Clearing chrome proxy settings...');
|
||||
console.log('Doing without proxy...');
|
||||
const pacDataPromise = doWithoutProxyAsync(
|
||||
// Employ all urls, the latter are fallbacks for the former.
|
||||
() =>
|
||||
|
|
Loading…
Reference in New Issue
Block a user