From 591a887bf3b30ed366fa6738e02acdc5ce491d98 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 7 Oct 2021 23:20:53 +0000 Subject: [PATCH] [Pale-Moon] Issue MoonchildProductions/UXP#1721 - Implement GlobalPrivacyControl Front-end and locale changes for GPC in preferences as well as migration. Also bumps the back-end pointer to pick up the platform changes necessary. --- .../palemoon/components/nsBrowserGlue.js | 10 ++++++- .../components/preferences/privacy.xul | 26 +++++++++---------- .../chrome/browser/preferences/privacy.dtd | 8 +++--- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index 055fb40575..958475a29e 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -1284,7 +1284,7 @@ BrowserGlue.prototype = { }, _migrateUI: function() { - const UI_VERSION = 24; + const UI_VERSION = 26; const BROWSER_DOCURL = "chrome://browser/content/browser.xul#"; let currentUIVersion = 0; try { @@ -1558,6 +1558,14 @@ BrowserGlue.prototype = { Services.prefs.clearUserPref("dom.abortController.enabled"); } + if (currentUIVersion < 26) { + // DoNotTrack is now GPC. Carry across user preference. + if (Services.prefs.prefHasUserValue("privacy.donottrackheader.enabled")) { + let DNTEnabled = Services.prefs.getBoolPref("privacy.donottrackheader.enabled"); + Services.prefs.setBoolPref("privacy.GPCheader.enabled", DNTEnabled); + Services.prefs.clearUserPref("privacy.donottrackheader.enabled"); + } + } // Clear out dirty storage if (this._dirty) { diff --git a/application/palemoon/components/preferences/privacy.xul b/application/palemoon/components/preferences/privacy.xul index 50b89f1620..e5175422dc 100644 --- a/application/palemoon/components/preferences/privacy.xul +++ b/application/palemoon/components/preferences/privacy.xul @@ -22,9 +22,9 @@ - - + @@ -216,18 +216,18 @@ - - - &tracking.label; + + + &dataPrivacy.label; - + - diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/privacy.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/privacy.dtd index 37f8b78c0d..1e395694ce 100644 --- a/application/palemoon/locales/en-US/chrome/browser/preferences/privacy.dtd +++ b/application/palemoon/locales/en-US/chrome/browser/preferences/privacy.dtd @@ -2,11 +2,11 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + - - - + + +