MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. k-0
    3. Topics
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    K
    Offline
    • Profile
    • Following 1
    • Followers 0
    • Topics 2
    • Posts 8
    • Groups 0

    Topics

    • K

      Canteen-module // Mensa-Modul

      Watching Ignoring Scheduled Pinned Locked Moved Solved Requests
      15
      0 Votes
      15 Posts
      5k Views
      lavolp3L
      @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")
    • K

      Module shows no text.

      Watching Ignoring Scheduled Pinned Locked Moved Development
      6
      0 Votes
      6 Posts
      1k Views
      ?
      @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 }
    • 1 / 1