Bug 1359289 - Add a "Learn More" link to Safe Browsing checkbox in about:preferences. r=jhofmann
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -1066,16 +1066,20 @@ var gPrivacyPane = {
let safeBrowsingMalwarePref = document.getElementById("browser.safebrowsing.malware.enabled");
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");
+ let learnMoreLink = document.getElementById("enableSafeBrowsingLearnMore");
+ let phishingUrl = "https://support.mozilla.org/kb/how-does-phishing-and-malware-protection-work";
+ learnMoreLink.setAttribute("href", phishingUrl);
+
enableSafeBrowsing.addEventListener("command", function() {
safeBrowsingPhishingPref.value = enableSafeBrowsing.checked;
safeBrowsingMalwarePref.value = enableSafeBrowsing.checked;
if (enableSafeBrowsing.checked) {
if (blockDownloads) {
blockDownloads.removeAttribute("disabled");
if (blockDownloads.checked) {
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -757,19 +757,23 @@
hidden="true"
data-category="panePrivacy">
<label class="header-name" flex="1">&security.label;</label>
</hbox>
<!-- addons, forgery (phishing) UI Security -->
<groupbox id="browsingProtectionGroup" data-category="panePrivacy" hidden="true">
<caption><label>&browsingProtection.label;</label></caption>
- <checkbox id="enableSafeBrowsing"
- label="&enableSafeBrowsing.label;"
- accesskey="&enableSafeBrowsing.accesskey;" />
+ <hbox align = "center">
+ <checkbox id="enableSafeBrowsing"
+ label="&enableSafeBrowsing.label;"
+ accesskey="&enableSafeBrowsing.accesskey;" />
+ <label id="enableSafeBrowsingLearnMore"
+ class="learnMore text-link">&enableSafeBrowsingLearnMore.label;</label>
+ </hbox>
<vbox class="indent">
#ifdef MOZILLA_OFFICIAL
<checkbox id="blockDownloads"
label="&blockDownloads.label;"
accesskey="&blockDownloads.accesskey;" />
#endif
<checkbox id="blockUncommonUnwanted"
label="&blockUncommonAndUnwanted.label;"
--- a/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
@@ -112,8 +112,9 @@
<!ENTITY browserContainersEnabled.label "Enable Container Tabs">
<!ENTITY browserContainersEnabled.accesskey "n">
<!ENTITY browserContainersSettings.label "Settingsā¦">
<!ENTITY browserContainersSettings.accesskey "i">
<!ENTITY a11yPrivacy.checkbox.label "Prevent accessibility services from accessing your browser">
<!ENTITY a11yPrivacy.checkbox.accesskey "a">
<!ENTITY a11yPrivacy.learnmore.label "Learn more">
+<!ENTITY enableSafeBrowsingLearnMore.label "Learn more">
\ No newline at end of file