-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (47 loc) · 1.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<body></body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.js"></script>
<script src="/bower_components/ot/dist/ot.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.1.1/sockjs.js"></script>
<script src="/statebus.js"></script>
<script>
"use strict";
window.statebus_server = window.location.protocol + '//' + window.location.hostname + ':8004';
window.statebus_version = 4;
</script>
<script src="/client.js"></script>
<link rel="stylesheet" href="/cursors.css">
<script src="/collaborative_editor.js"></script>
<script>
bus.fetch('/code', (code) => {
console.log("Fetched", code);
eval(code.text);
})
// ReactDOM.render(React.createElement(CollaborativeEditor), document.body);
// bus('counter').to_fetch = (key) => {
// let value = 0;
// setInterval(() => {
// value++;
// bus.save.fire({
// key: key,
// value: value
// });
// }, 1000);
// return {
// value: value
// }
// }
// class Counter extends StatebusComponent {
// constructor(props) {
// super(props);
// }
// render() {
// if (!this.mounted) {
// return React.DOM.div({}, "Loading...");
// }
// return React.DOM.div({}, "" + this.state.statebus.counter.value);
// }
// }
// ReactDOM.render(React.createElement(Counter), document.body);
</script>