Commit a37371ac authored by Georg Koppen's avatar Georg Koppen
Browse files

Merge branch 'bug13576-01'

parents b48d563e 78f505c2
......@@ -79,8 +79,7 @@
oncommand="onBridgeTypeRadioChange()">
<radio id="bridgeRadioDefault"
label="&torsettings.useBridges.default;" selected="true" />
<hbox align="baseline" style="margin-top: -5px">
<spacer style="width: 1.9em" />
<hbox id="bridgeDefaultEntry" align="baseline" style="margin-top: -5px">
<label id="defaultBridgeTypeLabel"
value="&torsettings.useBridges.type;"
control="defaultBridgeType"/>
......@@ -99,7 +98,7 @@
<vbox id="bridgeCustomEntry">
<label id="bridgeListLabel" style="margin-top:0px;"
value="&torsettings.useBridges.label;" control="bridgeList"/>
<textbox id="bridgeList" multiline="true" rows="3"
<textbox id="bridgeList" multiline="true" rows="3" wrap="off"
oninput="onCustomBridgesTextInput();"
placeholder="&torsettings.useBridges.placeholder;" />
</vbox>
......
......@@ -69,6 +69,8 @@ function initDialog()
var isWindows = TorLauncherUtil.isWindows;
if (isWindows)
document.documentElement.setAttribute("class", "os-windows");
else if (TorLauncherUtil.isMac)
document.documentElement.setAttribute("class", "os-mac");
var forAssistance = document.getElementById("forAssistance");
if (forAssistance)
......@@ -1305,7 +1307,6 @@ function parseAndValidateBridges(aStr)
return null;
var resultStr = aStr;
resultStr = resultStr.replace(/bridge/gi, ""); // Remove "bridge" everywhere.
resultStr = resultStr.replace(/\r\n/g, "\n"); // Convert \r\n pairs into \n.
resultStr = resultStr.replace(/\r/g, "\n"); // Convert \r into \n.
resultStr = resultStr.replace(/\n\n/g, "\n"); // Condense blank lines.
......@@ -1314,7 +1315,8 @@ function parseAndValidateBridges(aStr)
var tmpArray = resultStr.split('\n');
for (var i = 0; i < tmpArray.length; i++)
{
let s = tmpArray[i].trim(); // Remove extraneous whitespace.
let s = tmpArray[i].trim(); // Remove extraneous white space.
s = s.replace(/^bridge\s+/i, ""); // Remove "bridge " from start of line.
resultArray.push(s);
}
......@@ -1397,8 +1399,7 @@ function setElemValue(aID, aValue)
// Returns true if one or more values were set.
function setBridgeListElemValue(aBridgeArray)
{
// To be consistent with bridges.torproject.org, pre-pend "bridge" to
// each line as it is displayed in the UI.
// Trim white space and only keep non-empty values.
var bridgeList = [];
if (aBridgeArray)
{
......@@ -1406,11 +1407,7 @@ function setBridgeListElemValue(aBridgeArray)
{
var s = aBridgeArray[i].trim();
if (s.length > 0)
{
if (s.toLowerCase().indexOf("bridge") != 0)
s = "bridge " + s;
bridgeList.push(s);
}
}
}
......
......@@ -24,7 +24,7 @@ wizard {
}
wizard.os-windows {
width: 46em;
width: 49em;
height: 41em;
}
......@@ -99,8 +99,14 @@ wizard[tor_hide_browser_logo="true"] .tbb-logo-separator {
display: none;
}
#bridgeDefaultEntry,
#bridgeCustomEntry {
margin-left: 30px;
margin-left: 1.8em;
}
dialog.os-mac #bridgeList,
wizard.os-mac #bridgeList {
font-size: 90%;
}
wizardpage[pageid="startingTor"] description,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment