Bug 1400660 - Create a new pref to determine the initial state of the 'See details' panel in about:blocked pages.
MozReview-Commit-ID: CxZmvc34ULB
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -649,16 +649,17 @@ pref("mousewheel.with_shift.action", 4);
pref("mousewheel.with_alt.action", 2);
pref("mousewheel.with_meta.action", 1); // win key on Win, Super/Hyper on Linux
#endif
pref("mousewheel.with_control.action",3);
pref("mousewheel.with_win.action", 1);
pref("browser.xul.error_pages.enabled", true);
pref("browser.xul.error_pages.expert_bad_cert", false);
+pref("browser.xul.error_pages.show_safe_browsing_details_on_load", false);
// Enable captive portal detection.
pref("network.captive-portal-service.enabled", true);
// If true, network link events will change the value of navigator.onLine
pref("network.manage-offline-status", true);
// We want to make sure mail URLs are handled externally...
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -194,16 +194,23 @@ var AboutBlockedSiteListener = {
"https://www.antiphishing.org//");
break;
}
// Set the firefox support url.
doc.getElementById("firefox_support").setAttribute("href",
"https://support.mozilla.org/kb/how-does-phishing-and-malware-protection-work");
+ // Show safe browsing details on load if the pref is set to true.
+ let showDetails = Services.prefs.getBoolPref("browser.xul.error_pages.show_safe_browsing_details_on_load");
+ if (showDetails) {
+ let details = content.document.getElementById("errorDescriptionContainer");
+ details.removeAttribute("hidden");
+ }
+
// Set safe browsing advisory link.
let advisoryUrl = Services.prefs.getCharPref(
"browser.safebrowsing.provider." + provider + ".advisoryURL", "");
if (!advisoryUrl) {
let el = content.document.getElementById("advisoryDesc");
el.remove();
return;
}