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>}[] {
|
function loadScripts(paths: (string | string[])[]) : {path: string, promise: Promise<Boolean>}[] {
|
||||||
let result = [];
|
let result = [];
|
||||||
for(let path of paths)
|
for(let path of paths)
|
||||||
|
|
|
@ -15,10 +15,8 @@ let chat: ChatBox;
|
||||||
let forumIdentity: TeaForumIdentity;
|
let forumIdentity: TeaForumIdentity;
|
||||||
|
|
||||||
function invokeMain() {
|
function invokeMain() {
|
||||||
Module['onRuntimeInitialized'] = function() {
|
if(moduleInitliaized) main();
|
||||||
console.log("Runtime ready!");
|
else moduleInitliaizeListener.push(main);
|
||||||
main();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue