Make it compatible without the auth stuff

This commit is contained in:
WolverinDEV 2018-04-19 15:59:00 +02:00
parent e1bb07e2a7
commit 5b291f4653
3 changed files with 23 additions and 4 deletions

View file

@ -0,0 +1,11 @@
{
"compilerOptions": {
"module": "none",
"target": "es6",
"sourceMap": true
},
"exclude": [
"../node_modules",
"../js/codec/workers"
]
}

View file

@ -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)

View file

@ -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() {