Read the statement by Michael Teeuw here.
This might be a daft question, but...
-
url: "", //Insert your url here result: false, defaults: { updateInterval: 30 * 60 * 1000 //Every 30 mins }, start: function(){ this.getData(); setInterval(()=>{ this.getData(); }, this.config.updateInterval); }, getDom: function() { var wrapper = document.createElement("div"); if(this.result){ var table = document.createElement("table"); for (var i = 0; i < this.result.length; i++) { var row = document.createElement("tr"); var name = document.createElement("td"); name.innerHTML = this.result[i].name; row.appendChild(name); table.appendChild(row); } wrapper.appendChild(table); } else { wrapper.innerHTML = "No data to show!"; } return wrapper; }, getData: function(){ $.getJSON(this.url, (data) => { this.result = data; this.updateDom(); }); }
-
@strawberry-3.141 Thanks for this, I’ll see if I can get it working
-
@strawberry-3-141 once I’ve got some code, how do I test it on my mirror?
Just copy the folder to the modules folder and add it to the config, or is there something else I need to do?
Thanks
-
@Mitchfarino no that’s it :)
-
@paviro Awesome, thank you!
I’m stumbling my way through, hopefully I’ll have something working soon :)
-
@Mitchfarino good luck! :)
-
@paviro Just one more question…
Why would I need to run npm install for some modules?
-
to install the dependencies listed in the package.json file
-
Hi All,
I’m struggling a bit here, does anyone fancy doing a bit of hand holding to point me in the right direction?
JS is completely knew to me, but I’m not sure where to start.
Thanks in advance - I’m happy to do it through chats on this forum, or using hangouts or something similar.
-
@Mitchfarino feel free to contact me via personal message