mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Added hiddenOnStartup flag to module configuration options to cause a module to be iniitally hidden after starting up
This commit is contained in:
parent
10dc315f3b
commit
8b1ce26fa6
11
js/loader.js
11
js/loader.js
@ -54,6 +54,16 @@ var Loader = (function () {
|
||||
|
||||
// Notify core of loaded modules.
|
||||
MM.modulesStarted(moduleObjects);
|
||||
|
||||
// Starting modules also hides any modules that have requeste dto be initially hidden
|
||||
for (var m in moduleObjects) {
|
||||
var module = moduleObjects[m];
|
||||
|
||||
if (module.data.hiddenOnStartup) {
|
||||
Log.info("Initially hiding " + module.name);
|
||||
module.hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -97,6 +107,7 @@ var Loader = (function () {
|
||||
path: moduleFolder + "/",
|
||||
file: moduleName + ".js",
|
||||
position: moduleData.position,
|
||||
hiddenOnStartup: moduleData.hiddenOnStartup,
|
||||
header: moduleData.header,
|
||||
configDeepMerge: typeof moduleData.configDeepMerge === "boolean" ? moduleData.configDeepMerge : false,
|
||||
config: moduleData.config,
|
||||
|
Loading…
x
Reference in New Issue
Block a user