mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Make safebrowsing optional at build time - Part 5: preferences
This commit is contained in:
parent
cc09c5f65f
commit
dbcd0c066f
7 changed files with 22 additions and 29 deletions
|
|
@ -964,8 +964,10 @@ pref("services.sync.prefs.sync.browser.link.open_newwindow", true);
|
||||||
pref("services.sync.prefs.sync.browser.newtabpage.enabled", true);
|
pref("services.sync.prefs.sync.browser.newtabpage.enabled", true);
|
||||||
pref("services.sync.prefs.sync.browser.newtabpage.pinned", true);
|
pref("services.sync.prefs.sync.browser.newtabpage.pinned", true);
|
||||||
pref("services.sync.prefs.sync.browser.offline-apps.notify", true);
|
pref("services.sync.prefs.sync.browser.offline-apps.notify", true);
|
||||||
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
pref("services.sync.prefs.sync.browser.safebrowsing.phishing.enabled", true);
|
pref("services.sync.prefs.sync.browser.safebrowsing.phishing.enabled", true);
|
||||||
pref("services.sync.prefs.sync.browser.safebrowsing.malware.enabled", true);
|
pref("services.sync.prefs.sync.browser.safebrowsing.malware.enabled", true);
|
||||||
|
#endif
|
||||||
pref("services.sync.prefs.sync.browser.search.update", true);
|
pref("services.sync.prefs.sync.browser.search.update", true);
|
||||||
pref("services.sync.prefs.sync.browser.sessionstore.restore_on_demand", true);
|
pref("services.sync.prefs.sync.browser.sessionstore.restore_on_demand", true);
|
||||||
pref("services.sync.prefs.sync.browser.startup.homepage", true);
|
pref("services.sync.prefs.sync.browser.startup.homepage", true);
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,5 @@ pref("app.update.badgeWaitTime", 0);
|
||||||
// If this is less than 5, then pasting code into the web console or scratchpad is disabled
|
// If this is less than 5, then pasting code into the web console or scratchpad is disabled
|
||||||
pref("devtools.selfxss.count", 100);
|
pref("devtools.selfxss.count", 100);
|
||||||
|
|
||||||
// Disable Google Safebrowsing by default. Without an API key, this won't work.
|
|
||||||
pref("browser.safebrowsing.phishing.enabled", false);
|
|
||||||
pref("browser.safebrowsing.malware.enabled", false);
|
|
||||||
pref("browser.safebrowsing.downloads.enabled", false);
|
|
||||||
pref("browser.safebrowsing.downloads.remote.enabled", false);
|
|
||||||
|
|
||||||
// Disable the UI controls for it as well for Basilisk-official.
|
|
||||||
pref("browser.safebrowsing.UI.enabled", false);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
pref("general.useragent.appVersionIsBuildID", true);
|
pref("general.useragent.appVersionIsBuildID", true);
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,11 @@ Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
const BASE_LIST_ID = "base";
|
const BASE_LIST_ID = "base";
|
||||||
const CONTENT_LIST_ID = "content";
|
const CONTENT_LIST_ID = "content";
|
||||||
const TRACK_SUFFIX = "-track-digest256";
|
const TRACK_SUFFIX = "-track-digest256";
|
||||||
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
const TRACKING_TABLE_PREF = "urlclassifier.trackingTable";
|
const TRACKING_TABLE_PREF = "urlclassifier.trackingTable";
|
||||||
const LISTS_PREF_BRANCH = "browser.safebrowsing.provider.mozilla.lists.";
|
const LISTS_PREF_BRANCH = "browser.safebrowsing.provider.mozilla.lists.";
|
||||||
const UPDATE_TIME_PREF = "browser.safebrowsing.provider.mozilla.nextupdatetime";
|
const UPDATE_TIME_PREF = "browser.safebrowsing.provider.mozilla.nextupdatetime";
|
||||||
|
#endif
|
||||||
|
|
||||||
var gBlocklistManager = {
|
var gBlocklistManager = {
|
||||||
_type: "",
|
_type: "",
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@ var gSecurityPane = {
|
||||||
|
|
||||||
this._pane = document.getElementById("paneSecurity");
|
this._pane = document.getElementById("paneSecurity");
|
||||||
this._initMasterPasswordUI();
|
this._initMasterPasswordUI();
|
||||||
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
this._initSafeBrowsing();
|
this._initSafeBrowsing();
|
||||||
|
#endif
|
||||||
|
|
||||||
setEventListener("addonExceptions", "command",
|
setEventListener("addonExceptions", "command",
|
||||||
gSecurityPane.showAddonExceptions);
|
gSecurityPane.showAddonExceptions);
|
||||||
|
|
@ -160,6 +162,7 @@ var gSecurityPane = {
|
||||||
checkbox.checked = !noMP;
|
checkbox.checked = !noMP;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
_initSafeBrowsing() {
|
_initSafeBrowsing() {
|
||||||
let enableSafeBrowsing = document.getElementById("enableSafeBrowsing");
|
let enableSafeBrowsing = document.getElementById("enableSafeBrowsing");
|
||||||
let blockDownloads = document.getElementById("blockDownloads");
|
let blockDownloads = document.getElementById("blockDownloads");
|
||||||
|
|
@ -168,24 +171,12 @@ var gSecurityPane = {
|
||||||
let safeBrowsingPhishingPref = document.getElementById("browser.safebrowsing.phishing.enabled");
|
let safeBrowsingPhishingPref = document.getElementById("browser.safebrowsing.phishing.enabled");
|
||||||
let safeBrowsingMalwarePref = document.getElementById("browser.safebrowsing.malware.enabled");
|
let safeBrowsingMalwarePref = document.getElementById("browser.safebrowsing.malware.enabled");
|
||||||
|
|
||||||
let safeBrowsingUIPref = document.getElementById("browser.safebrowsing.UI.enabled");
|
|
||||||
let safeBrowsingUISep = document.getElementById("safeBrowsingUISep");
|
|
||||||
let safeBrowsingUIGroup = document.getElementById("safeBrowsingUIGroup");
|
|
||||||
|
|
||||||
let blockDownloadsPref = document.getElementById("browser.safebrowsing.downloads.enabled");
|
let blockDownloadsPref = document.getElementById("browser.safebrowsing.downloads.enabled");
|
||||||
let malwareTable = document.getElementById("urlclassifier.malwareTable");
|
let malwareTable = document.getElementById("urlclassifier.malwareTable");
|
||||||
|
|
||||||
let blockUnwantedPref = document.getElementById("browser.safebrowsing.downloads.remote.block_potentially_unwanted");
|
let blockUnwantedPref = document.getElementById("browser.safebrowsing.downloads.remote.block_potentially_unwanted");
|
||||||
let blockUncommonPref = document.getElementById("browser.safebrowsing.downloads.remote.block_uncommon");
|
let blockUncommonPref = document.getElementById("browser.safebrowsing.downloads.remote.block_uncommon");
|
||||||
|
|
||||||
if (safeBrowsingUIPref.value == false) {
|
|
||||||
safeBrowsingUISep.setAttribute("hidden", "true");
|
|
||||||
safeBrowsingUIGroup.setAttribute("hidden", "true");
|
|
||||||
} else {
|
|
||||||
safeBrowsingUISep.removeAttribute("hidden");
|
|
||||||
safeBrowsingUIGroup.removeAttribute("hidden");
|
|
||||||
}
|
|
||||||
|
|
||||||
enableSafeBrowsing.addEventListener("command", function() {
|
enableSafeBrowsing.addEventListener("command", function() {
|
||||||
safeBrowsingPhishingPref.value = enableSafeBrowsing.checked;
|
safeBrowsingPhishingPref.value = enableSafeBrowsing.checked;
|
||||||
safeBrowsingMalwarePref.value = enableSafeBrowsing.checked;
|
safeBrowsingMalwarePref.value = enableSafeBrowsing.checked;
|
||||||
|
|
@ -244,6 +235,7 @@ var gSecurityPane = {
|
||||||
|
|
||||||
blockUncommonUnwanted.checked = blockUnwantedPref.value && blockUncommonPref.value;
|
blockUncommonUnwanted.checked = blockUnwantedPref.value && blockUncommonPref.value;
|
||||||
},
|
},
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables/disables the master password button depending on the state of the
|
* Enables/disables the master password button depending on the state of the
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,13 @@
|
||||||
name="pref.privacy.disable_button.view_passwords_exceptions"
|
name="pref.privacy.disable_button.view_passwords_exceptions"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
|
|
||||||
<!-- Add-ons, malware, phishing -->
|
<!-- Add-ons -->
|
||||||
<preference id="xpinstall.whitelist.required"
|
<preference id="xpinstall.whitelist.required"
|
||||||
name="xpinstall.whitelist.required"
|
name="xpinstall.whitelist.required"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
|
|
||||||
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
|
<!-- Malware, phishing -->
|
||||||
<preference id="browser.safebrowsing.malware.enabled"
|
<preference id="browser.safebrowsing.malware.enabled"
|
||||||
name="browser.safebrowsing.malware.enabled"
|
name="browser.safebrowsing.malware.enabled"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
|
|
@ -28,10 +30,6 @@
|
||||||
name="browser.safebrowsing.phishing.enabled"
|
name="browser.safebrowsing.phishing.enabled"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
|
|
||||||
<preference id="browser.safebrowsing.UI.enabled"
|
|
||||||
name="browser.safebrowsing.UI.enabled"
|
|
||||||
type="bool"/>
|
|
||||||
|
|
||||||
<preference id="browser.safebrowsing.downloads.enabled"
|
<preference id="browser.safebrowsing.downloads.enabled"
|
||||||
name="browser.safebrowsing.downloads.enabled"
|
name="browser.safebrowsing.downloads.enabled"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
|
|
@ -46,6 +44,7 @@
|
||||||
<preference id="browser.safebrowsing.downloads.remote.block_uncommon"
|
<preference id="browser.safebrowsing.downloads.remote.block_uncommon"
|
||||||
name="browser.safebrowsing.downloads.remote.block_uncommon"
|
name="browser.safebrowsing.downloads.remote.block_uncommon"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
|
#endif
|
||||||
|
|
||||||
<!-- Passwords -->
|
<!-- Passwords -->
|
||||||
<preference id="signon.rememberSignons" name="signon.rememberSignons" type="bool"/>
|
<preference id="signon.rememberSignons" name="signon.rememberSignons" type="bool"/>
|
||||||
|
|
@ -61,7 +60,7 @@
|
||||||
<html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
|
<html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
<!-- addons, forgery (phishing) UI -->
|
<!-- addons -->
|
||||||
<groupbox id="addonsPhishingGroup" data-category="paneSecurity" hidden="true">
|
<groupbox id="addonsPhishingGroup" data-category="paneSecurity" hidden="true">
|
||||||
<caption><label>&general.label;</label></caption>
|
<caption><label>&general.label;</label></caption>
|
||||||
|
|
||||||
|
|
@ -77,8 +76,10 @@
|
||||||
accesskey="&addonExceptions.accesskey;"/>
|
accesskey="&addonExceptions.accesskey;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
<separator id="safeBrowsingUISep" class="thin"/>
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
<vbox id="safeBrowsingUIGroup" align="start">
|
<!-- Safebrowsing (phishing) UI -->
|
||||||
|
<separator class="thin"/>
|
||||||
|
<vbox align="start">
|
||||||
<checkbox id="enableSafeBrowsing"
|
<checkbox id="enableSafeBrowsing"
|
||||||
label="&enableSafeBrowsing.label;"
|
label="&enableSafeBrowsing.label;"
|
||||||
accesskey="&enableSafeBrowsing.accesskey;" />
|
accesskey="&enableSafeBrowsing.accesskey;" />
|
||||||
|
|
@ -91,6 +92,7 @@
|
||||||
accesskey="&blockUncommonUnwanted.accesskey;" />
|
accesskey="&blockUncommonUnwanted.accesskey;" />
|
||||||
</vbox>
|
</vbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
#endif
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<!-- Passwords -->
|
<!-- Passwords -->
|
||||||
|
|
|
||||||
|
|
@ -636,9 +636,11 @@ pref("media.eme.apiVisible", false);
|
||||||
// optimize images memory usage
|
// optimize images memory usage
|
||||||
pref("image.downscale-during-decode.enabled", true);
|
pref("image.downscale-during-decode.enabled", true);
|
||||||
|
|
||||||
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
pref("browser.safebrowsing.downloads.enabled", false);
|
pref("browser.safebrowsing.downloads.enabled", false);
|
||||||
|
|
||||||
pref("browser.safebrowsing.id", @MOZ_APP_UA_NAME@);
|
pref("browser.safebrowsing.id", @MOZ_APP_UA_NAME@);
|
||||||
|
#endif
|
||||||
|
|
||||||
// True if this is the first time we are showing about:firstrun
|
// True if this is the first time we are showing about:firstrun
|
||||||
pref("browser.firstrun.show.uidiscovery", true);
|
pref("browser.firstrun.show.uidiscovery", true);
|
||||||
|
|
|
||||||
|
|
@ -4998,6 +4998,7 @@ pref("dom.flyweb.enabled", false);
|
||||||
// Enable mapped array buffer by default.
|
// Enable mapped array buffer by default.
|
||||||
pref("dom.mapped_arraybuffer.enabled", true);
|
pref("dom.mapped_arraybuffer.enabled", true);
|
||||||
|
|
||||||
|
#ifdef MOZ_SAFE_BROWSING
|
||||||
// The tables used for Safebrowsing phishing and malware checks.
|
// The tables used for Safebrowsing phishing and malware checks.
|
||||||
pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,test-malware-simple,test-unwanted-simple");
|
pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,test-malware-simple,test-unwanted-simple");
|
||||||
|
|
||||||
|
|
@ -5105,6 +5106,7 @@ pref("browser.safebrowsing.id", "navclient-auto-ffox");
|
||||||
#else
|
#else
|
||||||
pref("browser.safebrowsing.id", "Firefox");
|
pref("browser.safebrowsing.id", "Firefox");
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Turn off Spatial navigation by default.
|
// Turn off Spatial navigation by default.
|
||||||
pref("snav.enabled", false);
|
pref("snav.enabled", false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue