AgP42 / MMM-iFrame-Ping

Module for MagicMirror² that allow to display an iFrame of (m)any web content to your MagicMirror²
35 stars 5 forks source link

Prevent refresh when modules is changed from hidden to visible #12

Open mlcampbe opened 4 years ago

mlcampbe commented 4 years ago

I have setup MMM-Pages to load 2 pages of modules. On the first page I have static info such as clock, calendar, newsfeed, etc... On the 2nd page I have a url being loaded in the iFramePing module that references my weather station. MMM-Pages is set to auto switch between the 2 pages every 15 seconds. All works as expected, but...

This weather station uses external sources that have limits on the number of API calls I can make in an hour/day. I am afraid I am going to exceed my API allotments so I am looking for an option to prevent MMM-iFrame-Ping from reloading the url when the page is hidden and then changed back to visible.

Is it possible that you can add a parameter such as refreshAfterHidden as true/false that will prevent the url from being refreshed and just reshow the module?

AgP42 commented 3 years ago

No sorry, that's not possible to "remember" a display without requesting it again.