diff --git a/chromium/background-scripts/background.js b/chromium/background-scripts/background.js index 51cca78d0489..cbe1161e4b96 100644 --- a/chromium/background-scripts/background.js +++ b/chromium/background-scripts/background.js @@ -73,6 +73,11 @@ chrome.storage.onChanged.addListener(async function(changes, areaName) { isExtensionEnabled = changes.globalEnabled.newValue; updateState(); } + if ('enableMixedRulesets' in changes) { + // Don't require users to restart the browsers + rules.settings.enableMixedRulesets = changes.enableMixedRulesets.newValue; + initializeAllRules(); + } if ('debugging_rulesets' in changes) { initializeAllRules(); } diff --git a/chromium/pages/options/index.html b/chromium/pages/options/index.html index d8d72dc3fe06..4bca2a72c133 100644 --- a/chromium/pages/options/index.html +++ b/chromium/pages/options/index.html @@ -7,15 +7,21 @@
-
+
-
+
+
+
+ + +
+
diff --git a/chromium/pages/options/style.css b/chromium/pages/options/style.css index 206ad62ca141..9b570806b276 100644 --- a/chromium/pages/options/style.css +++ b/chromium/pages/options/style.css @@ -6,6 +6,10 @@ margin-bottom: 20px; } +.general-settings-wrapper#mixed-rulesets-wrapper{ + margin-bottom: 20px; +} + .section-header{ margin-bottom: 10px; } diff --git a/chromium/pages/options/ux.js b/chromium/pages/options/ux.js index 29f06fe07886..1a380edc4dbf 100644 --- a/chromium/pages/options/ux.js +++ b/chromium/pages/options/ux.js @@ -32,16 +32,30 @@ document.addEventListener("DOMContentLoaded", () => { const showCounter = document.getElementById("showCounter"); const autoUpdateRulesets = document.getElementById("autoUpdateRulesets"); + const enableMixedRulesets = document.getElementById("enableMixedRulesets"); - sendMessage("get_option", { showCounter: true, autoUpdateRulesets: true }, item => { + const defaultOptions = { + showCounter: true, + autoUpdateRulesets: true, + enableMixedRulesets: false, + }; + + sendMessage("get_option", defaultOptions, item => { showCounter.checked = item.showCounter; autoUpdateRulesets.checked = item.autoUpdateRulesets; + enableMixedRulesets.checked = item.enableMixedRulesets; + showCounter.addEventListener("change", () => { sendMessage("set_option", { showCounter: showCounter.checked }); }); + autoUpdateRulesets.addEventListener("change", () => { sendMessage("set_option", { autoUpdateRulesets: autoUpdateRulesets.checked }); }); + + enableMixedRulesets.addEventListener("change", () => { + sendMessage("set_option", { enableMixedRulesets: enableMixedRulesets.checked }); + }) }); document.onkeydown = function(evt) { diff --git a/src/chrome/locale/en/https-everywhere.dtd b/src/chrome/locale/en/https-everywhere.dtd index c16099cb1891..ab7d9b3fd730 100644 --- a/src/chrome/locale/en/https-everywhere.dtd +++ b/src/chrome/locale/en/https-everywhere.dtd @@ -13,8 +13,10 @@ + +