Skip to content

Commit

Permalink
[Pale-Moon] Issue MoonchildProductions/UXP#1721 - Implement GlobalPri…
Browse files Browse the repository at this point in the history
…vacyControl

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.
  • Loading branch information
wolfbeast authored and roytam1 committed Oct 18, 2023
1 parent 50ad087 commit 591a887
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
10 changes: 9 additions & 1 deletion application/palemoon/components/nsBrowserGlue.js
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down
26 changes: 13 additions & 13 deletions application/palemoon/components/preferences/privacy.xul
Expand Up @@ -22,9 +22,9 @@

<preferences id="privacyPreferences">

<!-- Tracking -->
<preference id="privacy.donottrackheader.enabled"
name="privacy.donottrackheader.enabled"
<!-- Global Privacy Control -->
<preference id="privacy.GPCheader.enabled"
name="privacy.GPCheader.enabled"
type="bool"/>

<!-- XXX button prefs -->
Expand Down Expand Up @@ -216,18 +216,18 @@

</groupbox>

<!-- Tracking -->
<groupbox id="trackingPanel">
<caption>&tracking.label;</caption>
<!-- Global Privacy Control -->
<groupbox id="dataPrivacyPanel">
<caption>&dataPrivacy.label;</caption>
<hbox align="center">
<checkbox id="privacyDoNotTrackCheckbox"
label="&dntTrackingNotOkay.label2;"
accesskey="&dntTrackingNotOkay.accesskey;"
preference="privacy.donottrackheader.enabled"/>
<checkbox id="privacyGPCCheckbox"
label="&sendGPCheader.label;"
accesskey="&sendGPCheader.accesskey;"
preference="privacy.GPCheader.enabled"/>
<separator class="thin"/>
<label class="text-link" id="doNotTrackInfo"
href="https://www.palemoon.org/support/do-not-track"
value="&doNotTrackInfo.label;"/>
<label class="text-link" id="GPCInfo"
href="https://www.palemoon.org/support/global-privacy-control"
value="&GPCInfo.label;"/>

</hbox>
</groupbox>
Expand Down
Expand Up @@ -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/. -->

<!ENTITY tracking.label "Tracking">
<!ENTITY dataPrivacy.label "Data Privacy">

<!ENTITY dntTrackingNotOkay.label2 "Tell sites that I do not want to be tracked">
<!ENTITY dntTrackingNotOkay.accesskey "n">
<!ENTITY doNotTrackInfo.label "Learn More">
<!ENTITY sendGPCheader.label "Tell sites not to share or sell my data">
<!ENTITY sendGPCheader.accesskey "n">
<!ENTITY GPCInfo.label "Learn More">

<!ENTITY history.label "History">

Expand Down

0 comments on commit 591a887

Please sign in to comment.