MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Inserting a script output into the compliments module

    Troubleshooting
    1
    2
    1950
    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
      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
        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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy