@k-0 Of course they do. It is just a javascript function returning data that gets used by the nunjucks template.
This shortened and slightly more elegant if/else version should do the trick
today: (moment() < moment(this.config.switchTime, "HH:mm")) ? moment().format("dddd") : moment().add(1, "days").format("dddd")
@sdetweil
Yes, you’re right. it was just an example. Anyway, it can be done like this;
parseContent: function(text) {
this.lastPatched = JSON.parse(text)
this.updateDom()
},
getDom: function() {
var dom = document.createElement("div")
dom.id = "TEST"
if (this.lastPatched) {
... // draw patched data...
}
return dom
}