mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-13 04:56: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';
|
'use strict';
|
||||||
|
|
||||||
|
console.log('Extension started.');
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
const IF_DEBUG = true;
|
const IF_DEBUG = true;
|
||||||
|
|
|
@ -65,6 +65,11 @@
|
||||||
reject(getErr);
|
reject(getErr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const ifWeAreInControl = window.utils.areSettingsControlledFor(settings);
|
||||||
|
if (!ifWeAreInControl) {
|
||||||
|
resolve(createPromise());
|
||||||
|
return;
|
||||||
|
}
|
||||||
delete settings.levelOfControl;
|
delete settings.levelOfControl;
|
||||||
const setProxyAsync = () => new Promise((setResolve, setReject) => {
|
const setProxyAsync = () => new Promise((setResolve, setReject) => {
|
||||||
|
|
||||||
|
@ -80,7 +85,7 @@
|
||||||
reject(clearErr);
|
reject(clearErr);
|
||||||
return;
|
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(
|
const pacDataPromise = doWithoutProxyAsync(
|
||||||
// Employ all urls, the latter are fallbacks for the former.
|
// Employ all urls, the latter are fallbacks for the former.
|
||||||
() =>
|
() =>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user