From a250b46a0b6f7659bd14beef2b06f59c80e51e9c Mon Sep 17 00:00:00 2001 From: JustOff Date: Mon, 11 Jun 2018 13:46:22 +0300 Subject: [PALEMOON] Change the three-state DoNotTrack controls to a simple on/off switch --- application/palemoon/components/nsBrowserGlue.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'application/palemoon/components/nsBrowserGlue.js') 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); }, -- cgit v1.2.3