A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Added getHeader function
-
Per request, I’ve added a
getHeader()
method to the module api. This allows you to modify the header of the module from within the module itself.Note: that this method will only be called if the user has set a default header. If not no header will be shown and you won’t be able to update it.
Note: if you module’s users run an old version of MagicMirror (a version without this change), this method will not be called. No errors should be thrown. So it’s safe to use …
If you want to use the user’s set header in this method, just reference the
this.data.header
variable.Example code:
getHeader: function() { return this.data.header + ' append string'; }
More info:
- Documentation: https://github.com/MichMich/MagicMirror/tree/develop/modules#getheader
- Commit: https://github.com/MichMich/MagicMirror/commit/b2a7d3584bad2752d59d2325c581f5018e875306
Please let me know if this feature works for you …