summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/nsBrowserGlue.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-06-11 14:42:11 +0200
committerGitHub <noreply@github.com>2018-06-11 14:42:11 +0200
commitb1d82a62259c6888ea6f3f71f3e0973ea4b4e85e (patch)
treea68db88b7aa33f84961dac6fd7062f21b3e6429a /application/palemoon/components/nsBrowserGlue.js
parentbcb73db295d43574ded5376bae806fc18d50e21a (diff)
parenta250b46a0b6f7659bd14beef2b06f59c80e51e9c (diff)
downloadUXP-b1d82a62259c6888ea6f3f71f3e0973ea4b4e85e.tar
UXP-b1d82a62259c6888ea6f3f71f3e0973ea4b4e85e.tar.gz
UXP-b1d82a62259c6888ea6f3f71f3e0973ea4b4e85e.tar.lz
UXP-b1d82a62259c6888ea6f3f71f3e0973ea4b4e85e.tar.xz
UXP-b1d82a62259c6888ea6f3f71f3e0973ea4b4e85e.zip
Merge pull request #474 from JustOff/PR_dnt_two_state
[PALEMOON] Change the three-state DoNotTrack controls to a simple on/off switch
Diffstat (limited to 'application/palemoon/components/nsBrowserGlue.js')
-rw-r--r--application/palemoon/components/nsBrowserGlue.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js
index aa24d88ef..5910ae9c0 100644
--- a/application/palemoon/components/nsBrowserGlue.js
+++ b/application/palemoon/components/nsBrowserGlue.js
@@ -1207,7 +1207,7 @@ BrowserGlue.prototype = {
},
_migrateUI: function BG__migrateUI() {
- const UI_VERSION = 17;
+ const UI_VERSION = 18;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
let currentUIVersion = 0;
try {
@@ -1412,6 +1412,20 @@ BrowserGlue.prototype = {
delete this._rdf;
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.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},