update demo
This commit is contained in:
parent
b9e621fa07
commit
b6df6ec946
@ -4,15 +4,20 @@
|
|||||||
<title>Hy!</title>
|
<title>Hy!</title>
|
||||||
<script type="text/javascript" src="/static/jquery.min.js"></script>
|
<script type="text/javascript" src="/static/jquery.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
function reload() {
|
||||||
$("#repl-input").keyup(function(e) {
|
|
||||||
var input = $("#repl-input").val();
|
var input = $("#repl-input").val();
|
||||||
console.log("Input: " + input);
|
console.log("Input: " + input);
|
||||||
$('#repl-output').load(
|
$('#repl-output').load(
|
||||||
'/translate',
|
'/translate',
|
||||||
{"code": input}
|
{"code": input}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("#repl-input").keyup(function(e) {
|
||||||
|
reload();
|
||||||
});
|
});
|
||||||
|
reload();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@ -41,7 +46,11 @@ html, body {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class = 'repl' >
|
<div class = 'repl' >
|
||||||
<textarea id = 'repl-input' >; LISP input</textarea>
|
<textarea id = 'repl-input' >; LISP input
|
||||||
|
(import "sunlight")
|
||||||
|
|
||||||
|
(for [x (kwapply (sunlight.openstates.legislators) {"state" "ma"})]
|
||||||
|
(print x)) </textarea>
|
||||||
<pre id = 'repl-output' ></pre>
|
<pre id = 'repl-output' ></pre>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user