git @ Cat's Eye Technologies LiveMarkov / ee5eaca
Split off launcher script. This is not terribly modular, but, OK. Chris Pressey 3 months ago
2 changed file(s) with 17 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
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 }
3535 </head>
3636 <body>
3737 <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>
4440 <script src="../src/live-markov.js"></script>
4541 <script>
46 function launch() {
47 d3.select("#input").on("input", function() {
48 updateGraph(this.value);
49 });
50 }
51 launch("#input")
42 launch("#input");
5243 </script>
5344 </body>
5445 </html>