Global for Windows

This commit is contained in:
Luis Fernando Molina committed 2018-05-21 18:54:27 +02:00
1 parent 5a93b19655
commit a89e4b4952
3 files changed
+16 -3

No files matched your search

+9
View File
@@ -7,6 +7,15 @@ When running at the clode on NodeJS some things work diffently that at the brows
*/
function runBot() {
let root = newRoot();
root.initialize();
root.start();
}
function webRequire(pModulePath) {
+2 -1
View File
@@ -214,7 +214,8 @@ function newTimeControlPanel() {
case "Play Forward":
pressPlayForward();
runBot();
//pressPlayForward();
break;
case "Fast Forward":
+5 -2
View File
@@ -263,11 +263,14 @@
let result = pData.substring(pData.indexOf('=') + 2);
result = result.replace("require", "webRequire");
result = result.replace("global", "window");
result = replaceAll(result, "require", "webRequire");
result = replaceAll(result, "global", "window");
return result;
function replaceAll(text, search, replacement) {
return text.replace(new RegExp(search, 'g'), replacement);
}
}
function createHTML(callBackfunction) {