Make it compatible without the auth stuff
This commit is contained in:
parent
e1bb07e2a7
commit
5b291f4653
3 changed files with 23 additions and 4 deletions
11
js/codec/workers/tsconfig_base.json
Normal file
11
js/codec/workers/tsconfig_base.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "none",
|
||||
"target": "es6",
|
||||
"sourceMap": true
|
||||
},
|
||||
"exclude": [
|
||||
"../node_modules",
|
||||
"../js/codec/workers"
|
||||
]
|
||||
}
|
10
js/load.ts
10
js/load.ts
|
@ -1,3 +1,13 @@
|
|||
let moduleInitliaized = false;
|
||||
let moduleInitliaizeListener: (() => any)[] = [];
|
||||
if(typeof Module == "undefined")
|
||||
this["Module"] = {};
|
||||
Module['onRuntimeInitialized'] = function() {
|
||||
moduleInitliaized = true;
|
||||
for(let l of moduleInitliaizeListener)
|
||||
l();
|
||||
};
|
||||
|
||||
function loadScripts(paths: (string | string[])[]) : {path: string, promise: Promise<Boolean>}[] {
|
||||
let result = [];
|
||||
for(let path of paths)
|
||||
|
|
|
@ -15,10 +15,8 @@ let chat: ChatBox;
|
|||
let forumIdentity: TeaForumIdentity;
|
||||
|
||||
function invokeMain() {
|
||||
Module['onRuntimeInitialized'] = function() {
|
||||
console.log("Runtime ready!");
|
||||
main();
|
||||
};
|
||||
if(moduleInitliaized) main();
|
||||
else moduleInitliaizeListener.push(main);
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
|
Loading…
Add table
Reference in a new issue