-
Notifications
You must be signed in to change notification settings - Fork 2
/
MMM-HolidayLights.js
51 lines (46 loc) · 2.08 KB
/
MMM-HolidayLights.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* MagicMirror Module MMM-HolidayLights
*
* A modification of MMM-Xmas By cowboysdude
* (He's got a lot of really cool module for MM2!)
*
* I made this module after playing around with MMM-Xmas to re-learn
* css animations. Thanks John!!!
*
* this module shows a string of flashing lights across the top of your MM2
* That have different colors of lights corresponding to the 'holiday', or
* 'season', or 'celebrated day' that you choose to place in the code.
*
* NOT tested with Raspberry Pi or Linux-Based systems.
* It DOES work with Windows 10!!!
*
* version: 2.0.0
*
* By Jim Hallock ([email protected])
*
* Licensed with a crapload of good ole' Southern Sweet Tea
* and a lot of Cheyenne Extreme Menthol cigars!!!
*
*/
Module.register("MMM-HolidayLights", {
defaults: {
css: "",
// Holidays: "Valentine" "NewYears" "Christmas" "Halloween" "FourthOfJuly" "Easter"
// Seasons: "Winter" "Autumn" "Spring" "Summer"
// Celebrations/events: "MardiGras" "Pride"
// NFL Team Colors: "Chiefs" "Cowboys" "Broncos"
updateInterval: 5 * 1000
},
getStyles: function() {
return ["modules/MMM-HolidayLights/css/" + this.config.css + ".css"];
},
start: function() {
Log.info("Starting module: " + this.name);
console.log("Running Lights....");
},
getDom: function() {
var wrapper = document.createElement("ul");
wrapper.classList.add("strand");
wrapper.innerHTML = "<li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>";
return wrapper;
},
});