From 1027cb76901a2fe422c4e4d7a657541889be7b66 Mon Sep 17 00:00:00 2001 From: Krzysztof Jan Modras Date: Mon, 30 Oct 2017 19:08:03 +0100 Subject: [PATCH] Sent bootstarp addon state on every startup --- src/bootstrap.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bootstrap.js b/src/bootstrap.js index e61a740ce536..18b309239caa 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -91,6 +91,14 @@ function startup({webExtension}) { browser.runtime.onConnect.addListener((port) => { handle_enable_toggle(port); + + + // In Cliqz, the browser pref controls the state of https-everywhere, + // thus we send its value to webextension on startup + port.postMessage({ + type: "toggle_enabled_state", + value: branch.getBoolPref(PREF_NAME) + }); }); browser.runtime.onMessage.addListener((msg, sender, sendReply) => {