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) => {