mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +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.
|
// Notify core of loaded modules.
|
||||||
MM.modulesStarted(moduleObjects);
|
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 + "/",
|
path: moduleFolder + "/",
|
||||||
file: moduleName + ".js",
|
file: moduleName + ".js",
|
||||||
position: moduleData.position,
|
position: moduleData.position,
|
||||||
|
hiddenOnStartup: moduleData.hiddenOnStartup,
|
||||||
header: moduleData.header,
|
header: moduleData.header,
|
||||||
configDeepMerge: typeof moduleData.configDeepMerge === "boolean" ? moduleData.configDeepMerge : false,
|
configDeepMerge: typeof moduleData.configDeepMerge === "boolean" ? moduleData.configDeepMerge : false,
|
||||||
config: moduleData.config,
|
config: moduleData.config,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user