Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/wapython
Path: blob/main/web/cowasm.sh/src/index.ts
1067 views
1
import terminal from "./terminal";
2
import favicon from "./favicon.ico";
3
4
const link = document.createElement("div");
5
link.innerHTML =
6
`<div style='text-align:center;margin-bottom:15px;color:#555'><h3><img width="32px" height="32px" src="${favicon}" style="float:left; margin-left:15px"/><img width="32px" height="32px" src="${favicon}" style="float:right; margin-right:15px"/> CoWasm.sh &nbsp;&nbsp;-&nbsp;&nbsp;<a target='_blank' style='text-decoration: none;' href='https://www.npmjs.com/package/dash-wasm'>npm</a>&nbsp;&nbsp;&nbsp;<a target='_blank' style='text-decoration: none;' href='https://github.com/sagemathinc/cowasm#readme'/>GitHub</a></h3>CoWasm: Collaborative WebAssembly for servers and browsers.<br/>This is a demo of the <a target='_blank' href='https://www.npmjs.com/package/dash-wasm'>shell component</a> of CoWasm. There is also a <a target='_blank' href='https://cowasm.org'>Python demo</a>.<br/></div>`;
7
document.body.appendChild(link);
8
9
const favlink = document.createElement("link");
10
favlink.rel = "icon";
11
favlink.href = favicon;
12
document.getElementsByTagName("head")[0].appendChild(favlink);
13
14
const element = document.createElement("div");
15
document.body.appendChild(element);
16
document.body.style.margin = "0px";
17
18
async function main() {
19
while (true) {
20
element.innerHTML = "";
21
await terminal(element);
22
}
23
}
24
25
main();
26
27