summaryrefslogtreecommitdiffstats
path: root/browser/components/preferences/in-content/security.js
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-05-12 08:32:13 -0500
committertrav90 <travawine@protonmail.ch>2018-05-12 13:07:29 -0500
commit41d68e3f70b0aabc01cf9a49c43cf1aab0f4bdce (patch)
treeab1812ebad2c2f5eb46010b8af880ad022e054db /browser/components/preferences/in-content/security.js
parente07abdd2822f11b1cc10705ee47734b848acb0ce (diff)
downloadUXP-41d68e3f70b0aabc01cf9a49c43cf1aab0f4bdce.tar
UXP-41d68e3f70b0aabc01cf9a49c43cf1aab0f4bdce.tar.gz
UXP-41d68e3f70b0aabc01cf9a49c43cf1aab0f4bdce.tar.lz
UXP-41d68e3f70b0aabc01cf9a49c43cf1aab0f4bdce.tar.xz
UXP-41d68e3f70b0aabc01cf9a49c43cf1aab0f4bdce.zip
Make safebrowsing optional at build time - Part 5: preferences
Diffstat (limited to 'browser/components/preferences/in-content/security.js')
-rw-r--r--browser/components/preferences/in-content/security.js16
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