Clean up code by adding comments.

This commit is contained in:
Julian Dinter 2021-04-04 15:22:12 +02:00
parent 50cc1c56e5
commit c00bdf910e

View File

@ -5,6 +5,7 @@
* MIT Licensed. * MIT Licensed.
*/ */
Module.register("updatenotification", { Module.register("updatenotification", {
// Define module defaults
defaults: { defaults: {
updateInterval: 10 * 60 * 1000, // every 10 minutes updateInterval: 10 * 60 * 1000, // every 10 minutes
refreshInterval: 24 * 60 * 60 * 1000, // one day refreshInterval: 24 * 60 * 60 * 1000, // one day
@ -15,6 +16,7 @@ Module.register("updatenotification", {
suspended: false, suspended: false,
moduleList: {}, moduleList: {},
// Override start method.
start: function () { start: function () {
var self = this; var self = this;
Log.info("Starting module: " + this.name); Log.info("Starting module: " + this.name);
@ -32,6 +34,7 @@ Module.register("updatenotification", {
} }
}, },
// Override socket notification handler.
socketNotificationReceived: function (notification, payload) { socketNotificationReceived: function (notification, payload) {
if (notification === "STATUS") { if (notification === "STATUS") {
this.updateUI(payload); this.updateUI(payload);