mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 01:57:30 +09:00
[PALEMOON] Change the three-state DoNotTrack controls to a simple on/off switch
This commit is contained in:
parent
38dac3dae0
commit
c1f85b85de
5 changed files with 20 additions and 56 deletions
|
|
@ -1012,7 +1012,6 @@ pref("services.sync.prefs.sync.privacy.clearOnShutdown.sessions", true);
|
||||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true);
|
pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true);
|
||||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.connectivityData", true);
|
pref("services.sync.prefs.sync.privacy.clearOnShutdown.connectivityData", true);
|
||||||
pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);
|
pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);
|
||||||
pref("services.sync.prefs.sync.privacy.donottrackheader.value", true);
|
|
||||||
pref("services.sync.prefs.sync.privacy.sanitize.sanitizeOnShutdown", true);
|
pref("services.sync.prefs.sync.privacy.sanitize.sanitizeOnShutdown", true);
|
||||||
pref("services.sync.prefs.sync.security.OCSP.enabled", true);
|
pref("services.sync.prefs.sync.security.OCSP.enabled", true);
|
||||||
pref("services.sync.prefs.sync.security.OCSP.require", true);
|
pref("services.sync.prefs.sync.security.OCSP.require", true);
|
||||||
|
|
|
||||||
|
|
@ -1207,7 +1207,7 @@ BrowserGlue.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_migrateUI: function BG__migrateUI() {
|
_migrateUI: function BG__migrateUI() {
|
||||||
const UI_VERSION = 17;
|
const UI_VERSION = 18;
|
||||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||||
let currentUIVersion = 0;
|
let currentUIVersion = 0;
|
||||||
try {
|
try {
|
||||||
|
|
@ -1412,6 +1412,20 @@ BrowserGlue.prototype = {
|
||||||
delete this._rdf;
|
delete this._rdf;
|
||||||
delete this._dataSource;
|
delete this._dataSource;
|
||||||
|
|
||||||
|
if (currentUIVersion < 18) {
|
||||||
|
// Make sure the doNotTrack value conforms to the conversion from
|
||||||
|
// three-state to two-state. (This reverts a setting of "please track me"
|
||||||
|
// to the default "don't say anything").
|
||||||
|
try {
|
||||||
|
if (Services.prefs.getBoolPref("privacy.donottrackheader.enabled") &&
|
||||||
|
Services.prefs.getIntPref("privacy.donottrackheader.value") != 1) {
|
||||||
|
Services.prefs.clearUserPref("privacy.donottrackheader.enabled");
|
||||||
|
Services.prefs.clearUserPref("privacy.donottrackheader.value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ex) {}
|
||||||
|
}
|
||||||
|
|
||||||
// Update the migration version.
|
// Update the migration version.
|
||||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -150,42 +150,6 @@ var gPrivacyPane = {
|
||||||
document.getElementById("historyPane").selectedIndex = selectedIndex;
|
document.getElementById("historyPane").selectedIndex = selectedIndex;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the Tracking preferences based on controls.
|
|
||||||
*/
|
|
||||||
setTrackingPrefs: function PPP_setTrackingPrefs()
|
|
||||||
{
|
|
||||||
let dntRadioGroup = document.getElementById("doNotTrackSelection"),
|
|
||||||
dntValuePref = document.getElementById("privacy.donottrackheader.value"),
|
|
||||||
dntEnabledPref = document.getElementById("privacy.donottrackheader.enabled");
|
|
||||||
|
|
||||||
// if the selected radio button says "no preference", set on/off pref to
|
|
||||||
// false and don't change the value pref.
|
|
||||||
if (dntRadioGroup.selectedItem.value == -1) {
|
|
||||||
dntEnabledPref.value = false;
|
|
||||||
return dntValuePref.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
dntEnabledPref.value = true;
|
|
||||||
return dntRadioGroup.selectedItem.value;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Obtain the tracking preference value and reflect it in the UI.
|
|
||||||
*/
|
|
||||||
getTrackingPrefs: function PPP_getTrackingPrefs()
|
|
||||||
{
|
|
||||||
let dntValuePref = document.getElementById("privacy.donottrackheader.value"),
|
|
||||||
dntEnabledPref = document.getElementById("privacy.donottrackheader.enabled");
|
|
||||||
|
|
||||||
// if DNT is enbaled, select the value from the selected radio
|
|
||||||
// button, otherwise choose the "no preference" radio button
|
|
||||||
if (dntEnabledPref.value)
|
|
||||||
return dntValuePref.value;
|
|
||||||
|
|
||||||
return document.getElementById("dntnopref").value;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the private browsing auto-start pref and the history mode
|
* Update the private browsing auto-start pref and the history mode
|
||||||
* micro-management prefs based on the history mode menulist
|
* micro-management prefs based on the history mode menulist
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,6 @@
|
||||||
<preference id="privacy.donottrackheader.enabled"
|
<preference id="privacy.donottrackheader.enabled"
|
||||||
name="privacy.donottrackheader.enabled"
|
name="privacy.donottrackheader.enabled"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
<preference id="privacy.donottrackheader.value"
|
|
||||||
name="privacy.donottrackheader.value"
|
|
||||||
type="int"/>
|
|
||||||
|
|
||||||
<!-- XXX button prefs -->
|
<!-- XXX button prefs -->
|
||||||
<preference id="pref.privacy.disable_button.cookie_exceptions"
|
<preference id="pref.privacy.disable_button.cookie_exceptions"
|
||||||
|
|
@ -239,17 +236,11 @@
|
||||||
<!-- Tracking -->
|
<!-- Tracking -->
|
||||||
<tabpanel id="trackingPanel" orient="vertical">
|
<tabpanel id="trackingPanel" orient="vertical">
|
||||||
|
|
||||||
<radiogroup id="doNotTrackSelection" orient="vertical"
|
<checkbox id="privacyDoNotTrackCheckbox"
|
||||||
preference="privacy.donottrackheader.value"
|
label="&dntTrackingNotOkay.label2;"
|
||||||
onsynctopreference="return gPrivacyPane.setTrackingPrefs()"
|
accesskey="&dntTrackingNotOkay.accesskey;"
|
||||||
onsyncfrompreference="return gPrivacyPane.getTrackingPrefs()">
|
preference="privacy.donottrackheader.enabled"/>
|
||||||
<radio id="dntnotrack" value="1" label="&dntTrackingNotOkay.label2;"
|
<separator class="thin"/>
|
||||||
accesskey="&dntTrackingNotOkay.accesskey;" />
|
|
||||||
<radio id="dntdotrack" value="0" label="&dntTrackingOkay.label2;"
|
|
||||||
accesskey="&dntTrackingOkay.accesskey;" />
|
|
||||||
<radio id="dntnopref" value="-1" label="&dntTrackingNopref.label2;"
|
|
||||||
accesskey="&dntTrackingNopref.accesskey;" />
|
|
||||||
</radiogroup>
|
|
||||||
<label class="text-link" id="doNotTrackInfo"
|
<label class="text-link" id="doNotTrackInfo"
|
||||||
href="https://www.mozilla.org/dnt"
|
href="https://www.mozilla.org/dnt"
|
||||||
value="&doNotTrackInfo.label;"/>
|
value="&doNotTrackInfo.label;"/>
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,8 @@
|
||||||
|
|
||||||
<!ENTITY tracking.label "Tracking">
|
<!ENTITY tracking.label "Tracking">
|
||||||
|
|
||||||
<!ENTITY dntTrackingNopref.label2 "Do not tell sites anything about my tracking preferences">
|
|
||||||
<!ENTITY dntTrackingNopref.accesskey "o">
|
|
||||||
<!ENTITY dntTrackingNotOkay.label2 "Tell sites that I do not want to be tracked">
|
<!ENTITY dntTrackingNotOkay.label2 "Tell sites that I do not want to be tracked">
|
||||||
<!ENTITY dntTrackingNotOkay.accesskey "n">
|
<!ENTITY dntTrackingNotOkay.accesskey "n">
|
||||||
<!ENTITY dntTrackingOkay.label2 "Tell sites that I want to be tracked">
|
|
||||||
<!ENTITY dntTrackingOkay.accesskey "t">
|
|
||||||
<!ENTITY doNotTrackInfo.label "Learn More">
|
<!ENTITY doNotTrackInfo.label "Learn More">
|
||||||
|
|
||||||
<!ENTITY history.label "History">
|
<!ENTITY history.label "History">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue