forked from JerryI/wolfram-js-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.wsp
executable file
·65 lines (38 loc) · 1.33 KB
/
index.wsp
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
62
63
64
65
<?wsp LoadPage["template/header.wsp"] ?>
<div class="container" style="margin-top:1em">
<div class="d-flex align-items-center">
<div class="col-lg-10 col-md-8 mx-left">
<h1 class="fw-light">Console</h1>
<p class="lead text-muted">Direct commands to WF Engine</p>
<div action="" id="service">
<div class="form-group">
<label class="form-group-label" for="function">
Wolfram Language
</label>
<div id="console">
</div>
</div>
</div>
</div>
</div>
<div id="editor-placeholder">
</div>
</div>
<script>
function AddCell(id) {
var q = 'Block[{fireEvent = CellEventFire[client]}, CellObjCreateAfter[CellObj["'+id+'"]]]';
socket.send(q);
}
var global;
var last;
function OpenOnLoad() {
console.log("sub");
var q = 'NotebookOpen["console"]';
if (socket.readyState != 1) {
setTimeout(OpenOnLoad, 500);
} else {
setTimeout(socket.send(q), 500);
}
};
</script>
<?wsp LoadPage["template/footer.wsp"] ?>