Make Firefox load PAC on each start

This commit is contained in:
Ilya Ig. Petrov 2017-11-22 15:19:02 +05:00
parent 609017da1a
commit aa21b5ad9e

View File

@ -242,6 +242,12 @@
}, },
clearLastModified() {
this.setLastModified(0);
},
mustBeKey(key = mandatory()) { mustBeKey(key = mandatory()) {
if ( !(key === null || this.pacProviders[key]) ) { if ( !(key === null || this.pacProviders[key]) ) {
@ -519,6 +525,10 @@
// LAUNCH, RELOAD, ENABLE // LAUNCH, RELOAD, ENABLE
antiCensorRu.pacProviders = oldStorage.pacProviders; antiCensorRu.pacProviders = oldStorage.pacProviders;
console.log('Extension launched, reloaded or enabled.'); console.log('Extension launched, reloaded or enabled.');
if (window.apis.platform.ifFirefox) {
antiCensorRu.clearLastModified();
await new Promise((r) => antiCensorRu.syncWithPacProviderAsync(r)); // On each launch, ffx has no memory.
}
return resolve(); return resolve();
} }