Split off launcher script. This is not terribly modular, but, OK.
Chris Pressey
3 months ago
|
0 |
document.getElementById("installation-container").innerHTML =
|
|
1 |
`
|
|
2 |
<div id="input-container">
|
|
3 |
<textarea id="input" placeholder="Enter your text here..."></textarea>
|
|
4 |
<textarea id="output" placeholder="Generated text will appear here..." readonly></textarea>
|
|
5 |
</div>
|
|
6 |
<svg width="600" height="400"></svg>
|
|
7 |
`;
|
|
8 |
|
|
9 |
function launch() {
|
|
10 |
d3.select("#input").on("input", function() {
|
|
11 |
updateGraph(this.value);
|
|
12 |
});
|
|
13 |
}
|
35 | 35 |
</head>
|
36 | 36 |
<body>
|
37 | 37 |
<h1>LiveMarkov</h1>
|
38 | |
<div id="input-container">
|
39 | |
<textarea id="input" placeholder="Enter your text here..."></textarea>
|
40 | |
<textarea id="output" placeholder="Generated text will appear here..." readonly></textarea>
|
41 | |
</div>
|
42 | |
<svg width="600" height="400"></svg>
|
43 | |
|
|
38 |
<div id="installation-container"></div>
|
|
39 |
<script src="live-markov-launcher.js"></script>
|
44 | 40 |
<script src="../src/live-markov.js"></script>
|
45 | 41 |
<script>
|
46 | |
function launch() {
|
47 | |
d3.select("#input").on("input", function() {
|
48 | |
updateGraph(this.value);
|
49 | |
});
|
50 | |
}
|
51 | |
launch("#input")
|
|
42 |
launch("#input");
|
52 | 43 |
</script>
|
53 | 44 |
</body>
|
54 | 45 |
</html>
|