Skip to content
Snippets Groups Projects
Commit 45f5e2d9 authored by henry's avatar henry
Browse files

fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...

fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection

Bug 42476: Disable the Lox module for the stable release.
parent 303a1239
Branches
No related tags found
1 merge request!1003Disable the Lox module for the release channel
......@@ -1284,6 +1284,11 @@ const gLoxStatus = {
* Initialize the bridge pass area.
*/
init() {
if (!Lox.enabled) {
// Area should remain inactive and hidden.
return;
}
this._area = document.getElementById("tor-bridges-lox-status");
this._detailsArea = document.getElementById("tor-bridges-lox-details");
this._nextUnlockCounterEl = document.getElementById(
......@@ -1333,6 +1338,10 @@ const gLoxStatus = {
* Uninitialize the built-in bridges area.
*/
uninit() {
if (!Lox.enabled) {
return;
}
Services.obs.removeObserver(this, TorSettingsTopics.SettingsChanged);
Services.obs.removeObserver(this, LoxTopics.UpdateActiveLoxId);
Services.obs.removeObserver(this, LoxTopics.UpdateEvents);
......
......
......@@ -72,8 +72,7 @@ const gProvideBridgeDialog = {
document.l10n.setAttributes(document.documentElement, titleId);
// TODO: Make conditional on Lox being enabled.
this._allowLoxInvite = mode !== "edit"; // && Lox.enabled
this._allowLoxInvite = mode !== "edit" && Lox.enabled;
document.l10n.setAttributes(
document.getElementById("user-provide-bridge-textarea-label"),
......@@ -403,6 +402,9 @@ const gProvideBridgeDialog = {
return null;
}
// Only check if this looks like a Lox invite when the Lox module is
// enabled.
if (Lox.enabled) {
let loxInvite = null;
for (let line of this._textarea.value.split(/\r?\n/)) {
line = line.trim();
......@@ -414,6 +416,8 @@ const gProvideBridgeDialog = {
const isLoxInvite = Lox.validateInvitation(line);
if (isLoxInvite) {
if (!this._allowLoxInvite) {
// Lox is enabled, but not allowed invites when editing bridge
// addresses.
this.updateError({ type: "not-allowed-invite" });
return null;
}
......@@ -431,6 +435,7 @@ const gProvideBridgeDialog = {
if (loxInvite) {
return { loxInvite };
}
}
const validation = validateBridgeLines(this._textarea.value);
if (validation.errorLines.length) {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment