diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-25 01:31:25 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-25 01:41:05 +0200 |
commit | fcfd61829a1edd8519e3965f201f575d70a84239 (patch) | |
tree | 7fa0788f696d89f117cd274f03d743a8e67b8671 | |
parent | acd4eee44eb04fe01b0063818b492390f463ccec (diff) | |
download | uxp-fcfd61829a1edd8519e3965f201f575d70a84239.tar.gz |
Honor browser.safebrowsing.UI.enabled
This resolves #266
-rw-r--r-- | browser/components/preferences/in-content/security.js | 12 | ||||
-rw-r--r-- | browser/components/preferences/in-content/security.xul | 8 |
2 files changed, 18 insertions, 2 deletions
diff --git a/browser/components/preferences/in-content/security.js b/browser/components/preferences/in-content/security.js index a8ad28c7ea..0d7af39a3d 100644 --- a/browser/components/preferences/in-content/security.js +++ b/browser/components/preferences/in-content/security.js @@ -168,12 +168,24 @@ var gSecurityPane = { let safeBrowsingPhishingPref = document.getElementById("browser.safebrowsing.phishing.enabled"); let safeBrowsingMalwarePref = document.getElementById("browser.safebrowsing.malware.enabled"); + let safeBrowsingUIPref = document.getElementById("browser.safebrowsing.UI.enabled"); + let safeBrowsingUISep = document.getElementById("safeBrowsingUISep"); + let safeBrowsingUIGroup = document.getElementById("safeBrowsingUIGroup"); + let blockDownloadsPref = document.getElementById("browser.safebrowsing.downloads.enabled"); let malwareTable = document.getElementById("urlclassifier.malwareTable"); let blockUnwantedPref = document.getElementById("browser.safebrowsing.downloads.remote.block_potentially_unwanted"); let blockUncommonPref = document.getElementById("browser.safebrowsing.downloads.remote.block_uncommon"); + if (safeBrowsingUIPref.value == false) { + safeBrowsingUISep.setAttribute("hidden", "true"); + safeBrowsingUIGroup.setAttribute("hidden", "true"); + } else { + safeBrowsingUISep.removeAttribute("hidden"); + safeBrowsingUIGroup.removeAttribute("hidden"); + } + enableSafeBrowsing.addEventListener("command", function() { safeBrowsingPhishingPref.value = enableSafeBrowsing.checked; safeBrowsingMalwarePref.value = enableSafeBrowsing.checked; diff --git a/browser/components/preferences/in-content/security.xul b/browser/components/preferences/in-content/security.xul index b7bdb93613..5dc8ad5e92 100644 --- a/browser/components/preferences/in-content/security.xul +++ b/browser/components/preferences/in-content/security.xul @@ -28,6 +28,10 @@ name="browser.safebrowsing.phishing.enabled" type="bool"/> + <preference id="browser.safebrowsing.UI.enabled" + name="browser.safebrowsing.UI.enabled" + type="bool"/> + <preference id="browser.safebrowsing.downloads.enabled" name="browser.safebrowsing.downloads.enabled" type="bool"/> @@ -73,8 +77,8 @@ accesskey="&addonExceptions.accesskey;"/> </hbox> - <separator class="thin"/> - <vbox align="start"> + <separator id="safeBrowsingUISep" class="thin"/> + <vbox id="safeBrowsingUIGroup" align="start"> <checkbox id="enableSafeBrowsing" label="&enableSafeBrowsing.label;" accesskey="&enableSafeBrowsing.accesskey;" /> |