From aa21b5ad9ee200dcb2ea3286d0c35d073f26cd83 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Wed, 22 Nov 2017 15:19:02 +0500 Subject: [PATCH] Make Firefox load PAC on each start --- .../37-sync-pac-script-with-pac-provider-api.tmpl.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js index 9c07766..81edbc5 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js @@ -242,6 +242,12 @@ }, + clearLastModified() { + + this.setLastModified(0); + + }, + mustBeKey(key = mandatory()) { if ( !(key === null || this.pacProviders[key]) ) { @@ -519,6 +525,10 @@ // LAUNCH, RELOAD, ENABLE antiCensorRu.pacProviders = oldStorage.pacProviders; 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(); }