mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-27 16:25:21 +00:00
add support for custom regions, by detecting what is used in index.html (#3518)
read index.html to discover the regions used, make them the list checked by app.js and check:config test fixes #3504 supercedes #3506 no config.js param required
This commit is contained in:
23
tests/configs/customregions.js
Normal file
23
tests/configs/customregions.js
Normal file
@@ -0,0 +1,23 @@
|
||||
let config = {
|
||||
modules:
|
||||
// Using exotic content. This is why don't accept go to JSON configuration file
|
||||
(() => {
|
||||
let positions = ["row3_left", "top3_left1"];
|
||||
let modules = Array();
|
||||
for (let idx in positions) {
|
||||
modules.push({
|
||||
module: "helloworld",
|
||||
position: positions[idx],
|
||||
config: {
|
||||
text: `Text in ${positions[idx]}`
|
||||
}
|
||||
});
|
||||
}
|
||||
return modules;
|
||||
})()
|
||||
};
|
||||
|
||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== "undefined") {
|
||||
module.exports = config;
|
||||
}
|
Reference in New Issue
Block a user