diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.css b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.css index 18a2111ca1f9..2e9dce924e90 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.css +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.css @@ -19,6 +19,9 @@ body[tpEnabled] .showTpDisabled, body:not([tpEnabled]) .showTpEnabled { display: none !important; } +body[globalTpEnabled] .showGlobalTpDisabled { + display: none !important; +} @media screen and (min-width: 1200px) and (min-height: 700px) { body.private { diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js index 079216d02dc5..c728d13b9b23 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js @@ -14,18 +14,25 @@ const FAVICON_PRIVACY = "chrome://browser/skin/Privacy-16.png"; let stringBundle = Services.strings.createBundle( "chrome://browser/locale/aboutPrivateBrowsing.properties"); -let prefBranch = Services.prefs.getBranch("privacy.trackingprotection.pbmode."); +let prefBranch = Services.prefs.getBranch("privacy.trackingprotection."); let prefObserver = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), observe: function () { if (prefBranch.getBoolPref("enabled")) { + document.body.setAttribute("globalTpEnabled", "true"); + } else { + document.body.removeAttribute("globalTpEnabled"); + } + if (prefBranch.getBoolPref("pbmode.enabled") || + prefBranch.getBoolPref("enabled")) { document.body.setAttribute("tpEnabled", "true"); } else { document.body.removeAttribute("tpEnabled"); } }, }; +prefBranch.addObserver("pbmode.enabled", prefObserver, true); prefBranch.addObserver("enabled", prefObserver, true); function setFavIcon(url) { diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml index 0a108bedbc9a..c6590a1d4706 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml @@ -73,11 +73,11 @@