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.

    MMM-EmbedURL with MMM-Pages - Website reload....

    Scheduled Pinned Locked Moved Solved Troubleshooting
    11 Posts 3 Posters 2.0k Views 3 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.
    • BKeyportB Offline
      BKeyport Module Developer @sdetweil
      last edited by

      @sdetweil

      It shows, then resets, takes 2-3 seconds to show back up, then runs normally. The problem is that it’s just annoying to have it flash in and then blank, then come up and run.

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

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @BKeyport
        last edited by

        @BKeyport not sure @wishmaster270 got any ideas?

        Looks like you are creating new elements on each getDom(). the resume () will cause a getDom() which will cause the page reload in the new iframe object

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        wishmaster270W 1 Reply Last reply Reply Quote 0
        • wishmaster270W Offline
          wishmaster270 Module Developer @sdetweil
          last edited by

          @sdetweil Hi, the module calls the updateDom function every time it gets resumed in the current implementation.

          I am not sure if I can implemt a block option to skip the update dom but reset the timer for the regular updates.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @wishmaster270
            last edited by

            @wishmaster270 you could make the content you return fixed …

            getDom(){
                if(!this.already_created){
                   build content
                   this.already_created=new content
                }
                return this.already_created 
            }
            

            I do this in a few modules to reduce/eliminate the flash

            nothing says you HAVE to CREATE the content on each getDom()
            just have to return something

            so minor change… no logic change

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            wishmaster270W 1 Reply Last reply Reply Quote 0
            • wishmaster270W Offline
              wishmaster270 Module Developer @sdetweil
              last edited by

              @sdetweil
              Hi Sam,

              you are right. But i do not want the content to be fixed as some users want the content to be recreated after the configured interval.

              I just released a new version 0.0.8 of the module which introduces a updateDomOnShow option. If the option is set to false the module uses the old html elements after a resume. Maybe this fixes the issue.

              S 1 Reply Last reply Reply Quote 1
              • S Offline
                sdetweil @wishmaster270
                last edited by

                @wishmaster270 thanks… I didn’t know if the iframe would reload itself on show

                @BKeyport give this a try

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                BKeyportB 1 Reply Last reply Reply Quote 0
                • BKeyportB Offline
                  BKeyport Module Developer @sdetweil
                  last edited by

                  Tom, is it updateDomOnShow or updateDomOnResume ?

                  Documentation shows the latter.

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

                  BKeyportB 1 Reply Last reply Reply Quote 0
                  • BKeyportB Offline
                    BKeyport Module Developer @BKeyport
                    last edited by

                    I put them both in, and that fixed it - thanks, Tom.

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

                    wishmaster270W 1 Reply Last reply Reply Quote 1
                    • S sdetweil has marked this topic as solved on
                    • wishmaster270W Offline
                      wishmaster270 Module Developer @BKeyport
                      last edited by

                      @BKeyport Sorry, to one I’m the documentation is the correct one.

                      Great to hear it is working.

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