This forum was moved to another machine and updated to a recent version. If you are unable to login please delete your browser cookies and cache and restart your browser.A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Reloading config defaults or module
-
This post is deleted! -
@hango you will have to write code to allow a function instead of a string, then detect to function and call it to get the string to display
-
This post is deleted! -
@hango the code was less than i thought
replace this (last line of randomCompliment)return compliments[index] || '';
with this
var f = compliments[index]; if ( typeof f == 'function') f= f() return f || "";
a compliment config entry would look like this
module: "compliments", config: { compliments : { 'anytime': [ function(){return "this is a test "+ moment().format('MM DD HH:MM:SS')} ] } }
all of the things can be functions, or any combo down to just 1 entry as a function.
the function must return a string -
This post is deleted!