mirror of
https://github.com/Rushilwiz/MMM-MinimalCOVID19.git
synced 2025-04-09 22:10:19 -04:00
Testing
This commit is contained in:
parent
46fa9725e1
commit
1ae11745ad
|
@ -4,9 +4,28 @@ Module.register("MMM-MinimalCOVID19", {
|
||||||
getDom: function() {
|
getDom: function() {
|
||||||
var element = document.createElement("div")
|
var element = document.createElement("div")
|
||||||
element.className = "myContent"
|
element.className = "myContent"
|
||||||
element.innerHTML = "Hello, World!"
|
element.innerHTML = "Hello, World! " + this.config.foo
|
||||||
|
var subElement = document.createElement("p")
|
||||||
|
subElement.id = "COUNT"
|
||||||
|
element.appendChild(subElement)
|
||||||
return element
|
return element
|
||||||
},
|
},
|
||||||
notificationReceived: function() {},
|
notificationReceived: function(notification, payload, sender) {
|
||||||
socketNotificationReceived: function() {},
|
switch (notification) {
|
||||||
|
case "DOM_OBJECTS_CREATED":
|
||||||
|
var timer = setInterval(()=>{
|
||||||
|
this.sendSocketNotification("DO_YOUR_JOB", this.count)
|
||||||
|
this.count++
|
||||||
|
}, 1000)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
socketNotificationReceived: function(notification, payload) {
|
||||||
|
switch(notification) {
|
||||||
|
case "I_DID":
|
||||||
|
var elem = document.getElementById("COUNT")
|
||||||
|
elem.innerHTML = "Count:" + payload
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
var NodeHelper = require("node_helper")
|
var NodeHelper = require("node_helper")
|
||||||
|
|
||||||
module.exports = NodeHelper.create({
|
module.exports = NodeHelper.create({
|
||||||
start: function() {},
|
start: function() {
|
||||||
|
this.countDown = 10000000
|
||||||
|
},
|
||||||
socketNotificationReceived: function(notification, payload) {},
|
socketNotificationReceived: function(notification, payload) {},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user