• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

CalendarExt3 - Event transformer wildcard

Scheduled Pinned Locked Moved Solved Troubleshooting
15 Posts 2 Posters 1.8k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    BKeyport Module Developer @sdetweil
    last edited by Feb 20, 2025, 8:38 PM

    @sdetweil That did it… Well, other than typing out event rather than ev. :)

    All the same, Maybe it should be a check inside the javascript…

    The "E" in "Javascript" stands for "Easy"

    B S 2 Replies Last reply Feb 20, 2025, 8:39 PM Reply Quote 0
    • B BKeyport has marked this topic as solved on Feb 20, 2025, 8:38 PM
    • B Offline
      BKeyport Module Developer @BKeyport
      last edited by Feb 20, 2025, 8:39 PM

      For completeness - here’s the answer:

      	if(ev.description && ev.description.search("YCBM") > -1) {
             					 	ev.title = "Client"
       					} 
      

      The "E" in "Javascript" stands for "Easy"

      1 Reply Last reply Reply Quote 1
      • B BKeyport has marked this topic as solved on Feb 20, 2025, 8:39 PM
      • S Offline
        sdetweil @BKeyport
        last edited by Feb 20, 2025, 9:49 PM

        @BKeyport sorry, phone decided to autocorrect for me.

        but you got it. this IS javascript. without the test, the transformer crashed

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        B 1 Reply Last reply Feb 21, 2025, 7:27 AM Reply Quote 0
        • B Offline
          BKeyport Module Developer @sdetweil
          last edited by Feb 21, 2025, 7:27 AM

          @sdetweil right - what I’m saying is that maybe it should be in the module’s JS, rather than the config’s JS.

          Seems trivial to add a safeguard to automatically check for empty items before the transformer gets it. Might also protect against other bugs that way, thus improving the overall product.

          The "E" in "Javascript" stands for "Easy"

          S 1 Reply Last reply Feb 21, 2025, 2:24 PM Reply Quote 0
          • S Offline
            sdetweil @BKeyport
            last edited by Feb 21, 2025, 2:24 PM

            @BKeyport ah, but description is an optional field

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 1
            • 2
            • 2 / 2
            2 / 2
            • First post
              12/15
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy