Merge pull request #2475 from MystaraTheGreat/master

Added hiddenOnStartup flag to module config
This commit is contained in:
Michael Teeuw 2021-03-13 19:20:29 +01:00 committed by GitHub
commit 2b1dbbde68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,7 @@ _This release is scheduled to be released on 2021-04-01._
- `module.show` has now the option for a callback on error.
- Added locale to sample config file
- Added support for self-signed certificates for the default calendar module (#466)
- Added hiddenOnStartup flag to module config (#2475)
### Updated

View File

@ -54,6 +54,14 @@ var Loader = (function () {
// Notify core of loaded modules.
MM.modulesStarted(moduleObjects);
// Starting modules also hides any modules that have requested to be initially hidden
for (let thisModule of moduleObjects) {
if (thisModule.data.hiddenOnStartup) {
Log.info("Initially hiding " + thisModule.name);
thisModule.hide();
}
}
};
/**
@ -97,6 +105,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,