diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-05-16 17:11:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-16 17:11:17 +0200 |
commit | b702d7d32a9edec41cd2dad81dcf39107c1c5ddc (patch) | |
tree | 84bd9a32203822c02fc8056eb55f0a68315a7afc /browser/components/preferences/in-content/security.js | |
parent | 90942a2af0cabb9345cf04fa6113e12197504fcf (diff) | |
parent | 79edb388a3ce6facbb11de51eeade667dae0d995 (diff) | |
download | UXP-b702d7d32a9edec41cd2dad81dcf39107c1c5ddc.tar UXP-b702d7d32a9edec41cd2dad81dcf39107c1c5ddc.tar.gz UXP-b702d7d32a9edec41cd2dad81dcf39107c1c5ddc.tar.lz UXP-b702d7d32a9edec41cd2dad81dcf39107c1c5ddc.tar.xz UXP-b702d7d32a9edec41cd2dad81dcf39107c1c5ddc.zip |
Merge pull request #368 from trav90/safebrowsing-work
Make safebrowsing optional at build time
Diffstat (limited to 'browser/components/preferences/in-content/security.js')
-rw-r--r-- | browser/components/preferences/in-content/security.js | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/browser/components/preferences/in-content/security.js b/browser/components/preferences/in-content/security.js index 0d7af39a3..37a187f9c 100644 --- a/browser/components/preferences/in-content/security.js +++ b/browser/components/preferences/in-content/security.js @@ -23,7 +23,9 @@ var gSecurityPane = { this._pane = document.getElementById("paneSecurity"); this._initMasterPasswordUI(); +#ifdef MOZ_SAFE_BROWSING this._initSafeBrowsing(); +#endif setEventListener("addonExceptions", "command", gSecurityPane.showAddonExceptions); @@ -160,6 +162,7 @@ var gSecurityPane = { checkbox.checked = !noMP; }, +#ifdef MOZ_SAFE_BROWSING _initSafeBrowsing() { let enableSafeBrowsing = document.getElementById("enableSafeBrowsing"); let blockDownloads = document.getElementById("blockDownloads"); @@ -168,24 +171,12 @@ 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; @@ -244,6 +235,7 @@ var gSecurityPane = { blockUncommonUnwanted.checked = blockUnwantedPref.value && blockUncommonPref.value; }, +#endif /** * Enables/disables the master password button depending on the state of the |