$status.text = "Downloading: " + pct + "% [" + num + "]";
});
- xwt.newBox("main", function(num, den) {
+ xwt.newBox().apply("main", function(num, den) {
$left.flex = 50 + 50 * (num / den);
$right.flex = 50 * (1.0 - num / den);
if ($right.flex == 0) $right.width = 0;
} catch (e) {
$status.text = "Error: " + e;
- if ($status.text.substring(0, 13) == "Error: Error:") $status.text = $status.text.substring(7);
+ if ($status.text.substring(0, 13) == "Error: Error:") {
+ $status.text = $status.text.substring(7) +
+ " (press Esc to quit)";
+ }
}
}