reorganize client code

This commit is contained in:
ading2210 2024-01-02 01:25:04 -05:00
parent 27aa9ff74c
commit 643fc8e463
8 changed files with 32 additions and 26 deletions

21
main.js
View file

@ -1,21 +0,0 @@
const wsproxy_base = "wss://anura.pro/";
function allocate_str(str) {
return allocate(intArrayFromString(str), ALLOC_NORMAL);
}
function websocket_connect(websocket) {
return new Promise((resolve, reject) => {
websocket.onopen = () => {resolve()}
websocket.onerror = () => {reject()}
})
}
async function main() {
}
window.onload = () => {
console.log("page loaded, waiting for emscripten module load");
Module.onRuntimeInitialized = main;
};