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.

    Inserting a script output into the compliments module

    Scheduled Pinned Locked Moved Troubleshooting
    2 Posts 1 Posters 2.1k Views 1 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.
    • C Offline
      clever83
      last edited by

      I’ve have a javascript file that checks the date to display a certain message and if the date doesn’t match will output a random quote I have in an array. At the at moment I have that working ok but i’m stuck on how to take the var it has and put that in the module. I’m thinking that I could possibly add the anytime array into that java file for the remote file to pull it from it but I’m not sure if this would work

      {
          "anytime" : [
              text
          ],
      

      with the var=text
      Also i’m not sure if it would refresh throughout the day like the normal compliments do.

      Would anyone mind giving me some advice? Thank you

      1 Reply Last reply Reply Quote 0
      • C Offline
        clever83
        last edited by

        So i was rereading the wiki and noticed the remote file needs to be in .json format while the script is in .js. I’m sure that will make things more difficult

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          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