aboutsummaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-06-23 20:35:56 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-06-23 20:35:56 -0700
commite2777762c09f22d78c01da8085a3bc44c938b1ca (patch)
tree1cd45ebec9cc97ccb9b1f82ae90e9e54b996f7ff /demos
parentc1c1cbbef0be6e0094663adf9466af142bad1af3 (diff)
tweak python demo printing
Diffstat (limited to 'demos')
-rw-r--r--demos/python.html9
1 files changed, 5 insertions, 4 deletions
diff --git a/demos/python.html b/demos/python.html
index a31a0450..16d784aa 100644
--- a/demos/python.html
+++ b/demos/python.html
@@ -72,9 +72,10 @@
}
if (printed) {
- element.value = lines.join('\n') + element.value;
- } else {
- element.value = '\n(no output)\n-------------\n' + element.value;
+ element.value = element.value + lines.join('\n');
+ // scroll down
+ var len = element.textLength;
+ element.setSelectionRange(len-1, len);
}
}
@@ -127,6 +128,6 @@ print 'This is Python {} on {}'.format(sys.version, sys.platform)
</div>
</form>
<hr>
- <textarea id="output" style="font-family: monospace; width: 80%" rows="10" readonly></textarea>
+ <textarea id="output" style="font-family: monospace; width: 80%" rows="8" readonly></textarea>
</body>
</html>