diff --git a/src/js/main.js b/src/js/main.js index d9674c0c..3241d15b 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -316,7 +316,7 @@ function startProcess() { TABS.firmware_flasher.initialize(content_ready); break; case 'help': - TABS.help.initialize(content_ready); + import('./tabs/help').then(({ help }) => help.initialize(content_ready)); break; case 'auxiliary': TABS.auxiliary.initialize(content_ready); diff --git a/src/js/tabs/help.js b/src/js/tabs/help.js index d781f32f..426485a7 100644 --- a/src/js/tabs/help.js +++ b/src/js/tabs/help.js @@ -1,7 +1,5 @@ -'use strict'; - -TABS.help = {}; -TABS.help.initialize = function (callback) { +const help = {}; +help.initialize = function (callback) { if (GUI.active_tab != 'help') { GUI.active_tab = 'help'; @@ -14,6 +12,11 @@ TABS.help.initialize = function (callback) { }); }; -TABS.help.cleanup = function (callback) { +help.cleanup = function (callback) { if (callback) callback(); }; + +// TODO: remove when modules are in place +window.TABS.help = help; + +export { help }; diff --git a/src/main.html b/src/main.html index 51af014e..d2342c68 100644 --- a/src/main.html +++ b/src/main.html @@ -114,7 +114,6 @@ -