You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: development/core-module-file.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,7 +332,11 @@ Whenever your module need to be updated, call the `updateDom(speed)` method. It
332
332
requests the MagicMirror core to update its dom object. If you define the speed,
333
333
the content update will be animated, but only if the content will really change.
334
334
335
-
Note that the rendering of the updated dom on the screen will happen asynchronously. You can listen for the [`DOM_OBJECTS_UPDATED` notification](/development/notifications.html) to know when the rendering is complete and the new dom is safe to interact with. This notification only fires if the content will really change.
335
+
Note that the rendering of the updated dom on the screen will happen
336
+
asynchronously. You can listen for the
337
+
[`DOM_OBJECTS_UPDATED` notification](/development/notifications.html) to know
338
+
when the rendering is complete and the new dom is safe to interact with. This
339
+
notification only fires if the content will really change.
336
340
337
341
As an example: the clock modules calls this method every second:
|`ALL_MODULES_STARTED`|_none_| All modules are started. You can now send notifications to other modules. |
23
+
|`DOM_OBJECTS_CREATED`|_none_| All dom objects are created. The system is now ready to perform visual changes. |
24
+
|`MODULE_DOM_CREATED`|_none_| This module's dom has been fully loaded. You can now access your module's dom objects. |
25
25
|`MODULE_DOM_UPDATED`|_none_| This module's dom has been updated and re-rendered. You can now access your module's (updated) dom objects. This notification is sent in response to a call to [`updateDom`](https://docs.magicmirror.builders/development/core-module-file.html#module-instance-methods). |
Copy file name to clipboardExpand all lines: modules/compliments.md
+26-9Lines changed: 26 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,11 +58,15 @@ compliments.
58
58
Compliments can be set for a specific day in the format `YYYY-MM-DD`. `.` can be
59
59
used as a wildcard.
60
60
61
-
starting in Version 2.29, the compliments configuration can use a cron type specification, which provides more options. In addition to date, one can use hours, minutes and day of week for additional control
62
-
the cron format string is 5 groups of space separated values<br><br>
63
-
**minute hour day month day_of_week**<br><br>
64
-
each can be a range, and use numbers or names
65
-
see https://crontab-generator.org for a visual cron syntax creator.. this tool asks for the command to be executed (cron is usually used to execute commands on a schedule), just use anything, and take the first 5 space separated tokens of the result.
61
+
starting in Version 2.29, the compliments configuration can use a cron type
62
+
specification, which provides more options. In addition to date, one can use
63
+
hours, minutes and day of week for additional control the cron format string is
64
+
5 groups of space separated values<br><br> **minute hour day month
65
+
day_of_week**<br><br> each can be a range, and use numbers or names see
66
+
https://crontab-generator.org for a visual cron syntax creator.. this tool asks
67
+
for the command to be executed (cron is usually used to execute commands on a
68
+
schedule), just use anything, and take the first 5 space separated tokens of the
69
+
result.
66
70
67
71
If set, the weather can be used for compliments. The available properties are:
68
72
@@ -98,7 +102,7 @@ config: {
98
102
}
99
103
```
100
104
101
-
#### Example use with a cron entry
105
+
#### Example use with a cron entry
102
106
103
107
```javascript
104
108
config: {
@@ -109,11 +113,24 @@ config: {
109
113
}
110
114
}
111
115
```
112
-
this means, on Friday or Saturday, every week (* (every) month/day) between 16:48-16:50, 17:48-17:50, and 18:48-18:50, the assigned messages will be used. note: like with the date only setting, if these are the only possible messages you want displayed, you need to set **specialDayUnique:true**
113
116
114
-
another example,. you could use this for scary messages ONLY on between 8 and 9pm Halloween evening
115
-
<br>"* 20-21 31 10 *":["Boo!!"]
117
+
this means, on Friday or Saturday, every week (\* (every) month/day) between
118
+
16:48-16:50, 17:48-17:50, and 18:48-18:50, the assigned messages will be used.
119
+
note: like with the date only setting, if these are the only possible messages
120
+
you want displayed, you need to set **specialDayUnique:true**
116
121
122
+
As another example you could use this for scary messages ONLY between 8 and
0 commit comments