summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/preferences
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-06-10 20:46:30 +0200
committerGitHub <noreply@github.com>2018-06-10 20:46:30 +0200
commit27783db85a4d3c38b041e51b088ed2dbd35e96c1 (patch)
treebdecff2c72ae61e598585a2821a53c523fc89a4a /application/basilisk/components/preferences
parent25f9c54aded0f514e6be7eb3105fcdb214431a59 (diff)
parent7128f0d21de4d03be75133fbbd698f996fcd2a50 (diff)
downloadUXP-27783db85a4d3c38b041e51b088ed2dbd35e96c1.tar
UXP-27783db85a4d3c38b041e51b088ed2dbd35e96c1.tar.gz
UXP-27783db85a4d3c38b041e51b088ed2dbd35e96c1.tar.lz
UXP-27783db85a4d3c38b041e51b088ed2dbd35e96c1.tar.xz
UXP-27783db85a4d3c38b041e51b088ed2dbd35e96c1.zip
Merge pull request #469 from JustOff/PR_SB_DoNotTrack
[BASILISK] Remove tracking protection controls from the UI if safebrowsing isn't built
Diffstat (limited to 'application/basilisk/components/preferences')
-rw-r--r--application/basilisk/components/preferences/in-content/jar.mn2
-rw-r--r--application/basilisk/components/preferences/in-content/privacy.js14
-rw-r--r--application/basilisk/components/preferences/in-content/privacy.xul21
-rw-r--r--application/basilisk/components/preferences/jar.mn4
4 files changed, 40 insertions, 1 deletions
diff --git a/application/basilisk/components/preferences/in-content/jar.mn b/application/basilisk/components/preferences/in-content/jar.mn
index 130bf8549..e61a88856 100644
--- a/application/basilisk/components/preferences/in-content/jar.mn
+++ b/application/basilisk/components/preferences/in-content/jar.mn
@@ -8,7 +8,7 @@ browser.jar:
content/browser/preferences/in-content/subdialogs.js
content/browser/preferences/in-content/main.js
- content/browser/preferences/in-content/privacy.js
+* content/browser/preferences/in-content/privacy.js
content/browser/preferences/in-content/containers.js
content/browser/preferences/in-content/advanced.js
content/browser/preferences/in-content/applications.js
diff --git a/application/basilisk/components/preferences/in-content/privacy.js b/application/basilisk/components/preferences/in-content/privacy.js
index 7dfc7de5a..fced02fe6 100644
--- a/application/basilisk/components/preferences/in-content/privacy.js
+++ b/application/basilisk/components/preferences/in-content/privacy.js
@@ -22,6 +22,7 @@ var gPrivacyPane = {
*/
_shouldPromptForRestart: true,
+#ifdef MOZ_SAFEBROWSING
/**
* Show the Tracking Protection UI depending on the
* privacy.trackingprotection.ui.enabled pref, and linkify its Learn More link
@@ -50,6 +51,7 @@ var gPrivacyPane = {
let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "tracking-protection-pbm";
link.setAttribute("href", url);
},
+#endif
/**
* Initialize autocomplete to ensure prefs are in sync.
@@ -129,8 +131,10 @@ var gPrivacyPane = {
this.updateHistoryModePane();
this.updatePrivacyMicroControls();
this.initAutoStartPrivateBrowsingReverter();
+#ifdef MOZ_SAFEBROWSING
this._initTrackingProtection();
this._initTrackingProtectionPBM();
+#endif
this._initAutocomplete();
this._initBrowserContainers();
@@ -156,10 +160,12 @@ var gPrivacyPane = {
gPrivacyPane.clearPrivateDataNow(true);
return false;
});
+#ifdef MOZ_SAFEBROWSING
setEventListener("doNotTrackSettings", "click", function () {
gPrivacyPane.showDoNotTrackSettings();
return false;
});
+#endif
setEventListener("privateBrowsingAutoStart", "command",
gPrivacyPane.updateAutostart);
setEventListener("cookieExceptions", "command",
@@ -168,6 +174,7 @@ var gPrivacyPane = {
gPrivacyPane.showCookies);
setEventListener("clearDataSettings", "command",
gPrivacyPane.showClearPrivateDataSettings);
+#ifdef MOZ_SAFEBROWSING
setEventListener("trackingProtectionRadioGroup", "command",
gPrivacyPane.trackingProtectionWritePrefs);
setEventListener("trackingProtectionExceptions", "command",
@@ -176,12 +183,14 @@ var gPrivacyPane = {
gPrivacyPane.showBlockLists);
setEventListener("changeBlockListPBM", "command",
gPrivacyPane.showBlockLists);
+#endif
setEventListener("browserContainersCheckbox", "command",
gPrivacyPane._checkBrowserContainers);
setEventListener("browserContainersSettings", "command",
gPrivacyPane.showContainerSettings);
},
+#ifdef MOZ_SAFEBROWSING
// TRACKING PROTECTION MODE
/**
@@ -225,6 +234,7 @@ var gPrivacyPane = {
break;
}
},
+#endif
// HISTORY MODE
@@ -462,6 +472,7 @@ var gPrivacyPane = {
this._shouldPromptForRestart = true;
},
+#ifdef MOZ_SAFEBROWSING
/**
* Displays fine-grained, per-site preferences for tracking protection.
*/
@@ -476,6 +487,7 @@ var gPrivacyPane = {
gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
null, params);
},
+#endif
/**
* Displays container panel for customising and adding containers.
@@ -484,6 +496,7 @@ var gPrivacyPane = {
gotoPref("containers");
},
+#ifdef MOZ_SAFEBROWSING
/**
* Displays the available block lists for tracking protection.
*/
@@ -506,6 +519,7 @@ var gPrivacyPane = {
gSubDialog.open("chrome://browser/content/preferences/donottrack.xul",
"resizable=no");
},
+#endif
// HISTORY
diff --git a/application/basilisk/components/preferences/in-content/privacy.xul b/application/basilisk/components/preferences/in-content/privacy.xul
index 6ac6c88a4..8881a84fe 100644
--- a/application/basilisk/components/preferences/in-content/privacy.xul
+++ b/application/basilisk/components/preferences/in-content/privacy.xul
@@ -10,12 +10,18 @@
<preferences id="privacyPreferences" hidden="true" data-category="panePrivacy">
<!-- Tracking -->
+#ifdef MOZ_SAFEBROWSING
<preference id="privacy.trackingprotection.enabled"
name="privacy.trackingprotection.enabled"
type="bool"/>
<preference id="privacy.trackingprotection.pbmode.enabled"
name="privacy.trackingprotection.pbmode.enabled"
type="bool"/>
+#else
+ <preference id="privacy.donottrackheader.enabled"
+ name="privacy.donottrackheader.enabled"
+ type="bool"/>
+#endif
<!-- XXX button prefs -->
<preference id="pref.privacy.disable_button.cookie_exceptions"
@@ -85,6 +91,7 @@
<!-- Tracking -->
<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true">
+#ifdef MOZ_SAFEBROWSING
<vbox id="trackingprotectionbox" hidden="true">
<hbox align="start">
<vbox>
@@ -138,6 +145,20 @@
class="text-link" id="doNotTrackSettings"
>&doNotTrack.settings.label;</label>&doNotTrack.post.label;</description>
</vbox>
+#else
+ <vbox id="donottrackbox">
+ <caption><label>&tracking.label;</label></caption>
+ <hbox align="center">
+ <checkbox id="DoNotTrack"
+ preference="privacy.donottrackheader.enabled"
+ accesskey="&doNotTrack.accesskey;"
+ label="&doNotTrack.label;" />
+ <label class="text-link"
+ value="&doNotTrackLearnMore.label;"
+ href="https://www.mozilla.org/dnt"/>
+ </hbox>
+ </vbox>
+#endif
</groupbox>
<!-- History -->
diff --git a/application/basilisk/components/preferences/jar.mn b/application/basilisk/components/preferences/jar.mn
index c0d34da7f..b25fc89b8 100644
--- a/application/basilisk/components/preferences/jar.mn
+++ b/application/basilisk/components/preferences/jar.mn
@@ -5,14 +5,18 @@
browser.jar:
content/browser/preferences/applicationManager.xul
content/browser/preferences/applicationManager.js
+#ifdef MOZ_SAFEBROWSING
content/browser/preferences/blocklists.xul
content/browser/preferences/blocklists.js
+#endif
* content/browser/preferences/colors.xul
* content/browser/preferences/cookies.xul
content/browser/preferences/cookies.js
* content/browser/preferences/connection.xul
content/browser/preferences/connection.js
+#ifdef MOZ_SAFEBROWSING
content/browser/preferences/donottrack.xul
+#endif
* content/browser/preferences/fonts.xul
content/browser/preferences/fonts.js
content/browser/preferences/handlers.xml