mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 15:57:31 +09:00
[Basilisk] Issue #2 - Remove Safebrowsing and TrackingProtection from the FE
This resolves #2
This commit is contained in:
parent
591a887bf3
commit
6cefc52d32
36 changed files with 0 additions and 1389 deletions
|
|
@ -20,37 +20,6 @@ var gPrivacyPane = {
|
|||
*/
|
||||
_shouldPromptForRestart: true,
|
||||
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
/**
|
||||
* Show the Tracking Protection UI depending on the
|
||||
* privacy.trackingprotection.ui.enabled pref, and linkify its Learn More link
|
||||
*/
|
||||
_initTrackingProtection: function () {
|
||||
if (!Services.prefs.getBoolPref("privacy.trackingprotection.ui.enabled")) {
|
||||
return;
|
||||
}
|
||||
|
||||
let link = document.getElementById("trackingProtectionLearnMore");
|
||||
let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "tracking-protection";
|
||||
link.setAttribute("href", url);
|
||||
|
||||
this.trackingProtectionReadPrefs();
|
||||
|
||||
document.getElementById("trackingprotectionbox").hidden = false;
|
||||
document.getElementById("trackingprotectionpbmbox").hidden = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Linkify the Learn More link of the Private Browsing Mode Tracking
|
||||
* Protection UI.
|
||||
*/
|
||||
_initTrackingProtectionPBM: function () {
|
||||
let link = document.getElementById("trackingProtectionPBMLearnMore");
|
||||
let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "tracking-protection-pbm";
|
||||
link.setAttribute("href", url);
|
||||
},
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initialize autocomplete to ensure prefs are in sync.
|
||||
*/
|
||||
|
|
@ -76,10 +45,6 @@ var gPrivacyPane = {
|
|||
this.updateHistoryModePane();
|
||||
this.updatePrivacyMicroControls();
|
||||
this.initAutoStartPrivateBrowsingReverter();
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
this._initTrackingProtection();
|
||||
this._initTrackingProtectionPBM();
|
||||
#endif
|
||||
this._initAutocomplete();
|
||||
|
||||
setEventListener("privacy.sanitize.sanitizeOnShutdown", "change",
|
||||
|
|
@ -104,12 +69,6 @@ var gPrivacyPane = {
|
|||
gPrivacyPane.clearPrivateDataNow(true);
|
||||
return false;
|
||||
});
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
setEventListener("doNotTrackSettings", "click", function () {
|
||||
gPrivacyPane.showDoNotTrackSettings();
|
||||
return false;
|
||||
});
|
||||
#endif
|
||||
setEventListener("privateBrowsingAutoStart", "command",
|
||||
gPrivacyPane.updateAutostart);
|
||||
setEventListener("cookieExceptions", "command",
|
||||
|
|
@ -118,64 +77,8 @@ var gPrivacyPane = {
|
|||
gPrivacyPane.showCookies);
|
||||
setEventListener("clearDataSettings", "command",
|
||||
gPrivacyPane.showClearPrivateDataSettings);
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
setEventListener("trackingProtectionRadioGroup", "command",
|
||||
gPrivacyPane.trackingProtectionWritePrefs);
|
||||
setEventListener("trackingProtectionExceptions", "command",
|
||||
gPrivacyPane.showTrackingProtectionExceptions);
|
||||
setEventListener("changeBlockList", "command",
|
||||
gPrivacyPane.showBlockLists);
|
||||
setEventListener("changeBlockListPBM", "command",
|
||||
gPrivacyPane.showBlockLists);
|
||||
#endif
|
||||
},
|
||||
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
// TRACKING PROTECTION MODE
|
||||
|
||||
/**
|
||||
* Selects the right item of the Tracking Protection radiogroup.
|
||||
*/
|
||||
trackingProtectionReadPrefs() {
|
||||
let enabledPref = document.getElementById("privacy.trackingprotection.enabled");
|
||||
let pbmPref = document.getElementById("privacy.trackingprotection.pbmode.enabled");
|
||||
let radiogroup = document.getElementById("trackingProtectionRadioGroup");
|
||||
|
||||
// Global enable takes precedence over enabled in Private Browsing.
|
||||
if (enabledPref.value) {
|
||||
radiogroup.value = "always";
|
||||
} else if (pbmPref.value) {
|
||||
radiogroup.value = "private";
|
||||
} else {
|
||||
radiogroup.value = "never";
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the pref values based on the selected item of the radiogroup.
|
||||
*/
|
||||
trackingProtectionWritePrefs() {
|
||||
let enabledPref = document.getElementById("privacy.trackingprotection.enabled");
|
||||
let pbmPref = document.getElementById("privacy.trackingprotection.pbmode.enabled");
|
||||
let radiogroup = document.getElementById("trackingProtectionRadioGroup");
|
||||
|
||||
switch (radiogroup.value) {
|
||||
case "always":
|
||||
enabledPref.value = true;
|
||||
pbmPref.value = true;
|
||||
break;
|
||||
case "private":
|
||||
enabledPref.value = false;
|
||||
pbmPref.value = true;
|
||||
break;
|
||||
case "never":
|
||||
enabledPref.value = false;
|
||||
pbmPref.value = false;
|
||||
break;
|
||||
}
|
||||
},
|
||||
#endif
|
||||
|
||||
// HISTORY MODE
|
||||
|
||||
/**
|
||||
|
|
@ -412,48 +315,6 @@ var gPrivacyPane = {
|
|||
this._shouldPromptForRestart = true;
|
||||
},
|
||||
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
/**
|
||||
* Displays fine-grained, per-site preferences for tracking protection.
|
||||
*/
|
||||
showTrackingProtectionExceptions() {
|
||||
let bundlePreferences = document.getElementById("bundlePreferences");
|
||||
let params = {
|
||||
permissionType: "trackingprotection",
|
||||
hideStatusColumn: true,
|
||||
windowTitle: bundlePreferences.getString("trackingprotectionpermissionstitle"),
|
||||
introText: bundlePreferences.getString("trackingprotectionpermissionstext"),
|
||||
};
|
||||
gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
|
||||
null, params);
|
||||
},
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
/**
|
||||
* Displays the available block lists for tracking protection.
|
||||
*/
|
||||
showBlockLists: function ()
|
||||
{
|
||||
var bundlePreferences = document.getElementById("bundlePreferences");
|
||||
let brandName = document.getElementById("bundleBrand")
|
||||
.getString("brandShortName");
|
||||
var params = { brandShortName: brandName,
|
||||
windowTitle: bundlePreferences.getString("blockliststitle"),
|
||||
introText: bundlePreferences.getString("blockliststext") };
|
||||
gSubDialog.open("chrome://browser/content/preferences/blocklists.xul",
|
||||
null, params);
|
||||
},
|
||||
|
||||
/**
|
||||
* Displays the Do Not Track settings dialog.
|
||||
*/
|
||||
showDoNotTrackSettings() {
|
||||
gSubDialog.open("chrome://browser/content/preferences/donottrack.xul",
|
||||
"resizable=no");
|
||||
},
|
||||
#endif
|
||||
|
||||
// HISTORY
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue