Comments (4)
Hmm... No, not really, with the "gotourl" you will load another page instead of the mirror in the same webbrowser-window... But, maybe you could use the "showurl" and "hideurl"-button function...
In the button array, add a button that shows or hides (any) module. (for example, a "picture module" or any other then just use a picture of just 1 black pixel :))... And use the "showurl" and "hideurl" arguments in the button to trigger something... That should work... :) Don't know if it achieves what you want...
The button:
},
"1": {
// A button to show and hide the clock in this example, and is uses the "bell" icon.
module: "clock",
idnum: 1,
text: "Clock",
symbol: "bell",
symbol2: "bell-slash",
showUrl: "http://10.227.10.56:9000/material/?page=now-playing",
hideUrl: "http://10.227.10.56:9000/material/?page=stop-playing"
},
from mmm-modulebar.
Thank you very, very much for your quick reply, I just want to show this
module: "MMM-SmartWebDisplay",
//idnum: 1,
symbol: "fas fa-laptop-house",
symbol2: "fas fa-home",
showUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION¬ification=SWD_URL&payload={"url":["http://10.227.10.56:9000/material/?page=now-playing"], "update":"0", "NextURL":"0"}',
hideUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION¬ification=SWD_URL&payload={"url":[""], "update":"0", "NextURL":"0"}'
from mmm-modulebar.
if I want to use gotourl to load page 2,Is this the configuration parameter?
"1": {
module: "MMM-SmartWebDisplay",
//idnum: 1,
symbol: "fas fa-laptop-house",
symbol2: "fas fa-home",
showUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION¬ification=SWD_URL&payload={"url":["https://home.mygogo.win:8123/lovelace-magicmirror/0"], "update":"0", "NextURL":"0"}',
hideUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION¬ification=SWD_URL&payload={"url":[""], "update":"0", "NextURL":"0"}'
gotoUrl: 2
},
from mmm-modulebar.
I'm not sure I understand what you want to do... The "gotourl" can not be used in the same button as the "showurl" and "hideurl", at least have I not tried it that way. :) The "gotourl" needs to have the full URL defined. The "gotourl" will navigate away from the mirror it self and will load the page you have defined.
The "showurl" and "hideurl" will be visited in the "background", it will not show anywhere. I made that function to be able to "start" and "stop" a stream for MotionEye. So when the camera is "displayed" (by pressing the button) the "showurl" triggers MotionEye to start the stream for the camera. And when the camera is hidden again, the "hideurl" triggers MotionEye to stop the stream. Otherwise the hidden camera would stream all the time and a lot of bandwidth would be waisted. :)
However I don't know if this helps you. :) But that was the thinking behind the functions... :)
from mmm-modulebar.
Related Issues (12)
- Feature request: allow buttons to run custom scripts HOT 3
- Force Modulebar To Top Layer? HOT 2
- Feature Request: navigate to another url HOT 1
- How to determine the IDNUM parameter HOT 2
- Youless2 module not working when modulebar is active HOT 4
- Modulebar only one Module is working HOT 7
- Buttons not clickable HOT 7
- Feature Request: groups to make the buttons mutually exclusive HOT 2
- Invisible main button :-) HOT 3
- Initially hidden HOT 1
- Maybe move the MMM-HideAll module into this module? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmm-modulebar.