diff --git a/MMM-MyScoreboard.js b/MMM-MyScoreboard.js
index fb4a343..5e1a7a7 100644
--- a/MMM-MyScoreboard.js
+++ b/MMM-MyScoreboard.js
@@ -72,6 +72,10 @@ Module.register("MMM-MyScoreboard",{
"NCAAM" : {
provider: "ESPN",
logoFormat: "png"
+ },
+ "NCAAM_MM" : {
+ provider: "ESPN",
+ logoFormat: "png"
}
},
@@ -185,6 +189,13 @@ Module.register("MMM-MyScoreboard",{
});
}
+ //redirect path to logos to NCAAM
+ //for March Madness
+ var leagueForLogoPath = league;
+ if (league == "NCAAM_MM") {
+ leagueForLogoPath = "NCAAM";
+ }
+
//add team logos if applicable
if (this.viewStyleHasLogos(viewStyle)) {
@@ -192,7 +203,7 @@ Module.register("MMM-MyScoreboard",{
hTeamLogo.classList.add("logo", "home");
var hTeamLogoImg = document.createElement("img");
- hTeamLogoImg.src = this.file("logos/" + league + "/" + gameObj.hTeam + "." + this.supportedLeagues[league].logoFormat );
+ hTeamLogoImg.src = this.file("logos/" + leagueForLogoPath + "/" + gameObj.hTeam + "." + this.supportedLeagues[league].logoFormat );
hTeamLogoImg.setAttribute("data-abbr", gameObj.hTeam);
hTeamLogo.appendChild(hTeamLogoImg);
@@ -211,7 +222,7 @@ Module.register("MMM-MyScoreboard",{
vTeamLogo.classList.add("logo", "visitor");
var vTeamLogoImg = document.createElement("img");
- vTeamLogoImg.src = this.file("logos/" + league + "/" + gameObj.vTeam + "." + this.supportedLeagues[league].logoFormat );
+ vTeamLogoImg.src = this.file("logos/" + leagueForLogoPath + "/" + gameObj.vTeam + "." + this.supportedLeagues[league].logoFormat );
vTeamLogoImg.setAttribute("data-abbr", gameObj.vTeam);
vTeamLogo.appendChild(vTeamLogoImg);
@@ -348,7 +359,11 @@ Module.register("MMM-MyScoreboard",{
if (self.config.showLeagueSeparators) {
var leagueSeparator = document.createElement("div");
leagueSeparator.classList.add("league-separator");
- leagueSeparator.innerHTML = "" + sport.league + "";
+ if (sport.label) {
+ leagueSeparator.innerHTML = "" + sport.label + "";
+ } else {
+ leagueSeparator.innerHTML = "" + sport.league + "";
+ }
wrapper.appendChild(leagueSeparator);
}
self.sportsData[index].forEach(function(game, gidx) {
@@ -474,6 +489,7 @@ Module.register("MMM-MyScoreboard",{
gameDate.subtract(1, "day");
}
+
var self = this;
this.config.sports.forEach( function(sport, index) {
@@ -639,6 +655,10 @@ Module.register("MMM-MyScoreboard",{
"WAC" : ["CHS", "CSB", "GCU", "NMSU", "SEA", "TRGV", "UMKC", "UVU"],
"Top 25" : ["@T25"] //special indicator for Top 25 ranked teams
+ },
+
+ NCAAM_MM : {
+
}
}
diff --git a/README.md b/README.md
index 0fdca79..eb5e9dd 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ https://magicmirror.builders/
https://github.com/MichMich/MagicMirror
This module display's today's scores for your favourite teams across a number of different
-leagues, including NHL, NBA, NFL, MLB, MLS, CFL, NCAAF (FBS Division) and NCAAM (Division I).
+leagues, including NHL, NBA, NFL, MLB, MLS, CFL, NCAAF (FBS Division) and NCAAM (Division I and March Madness).
![Screen Shot](/../screenshots/MMM-MyScoreboard-screenshot.png?raw=true "Screen Shot")
@@ -84,6 +84,7 @@ Currently this module supports the following leagues:
* **CFL** - Canadian Football League
* **NCAAF** - NCAA College Football (FBS Division only)
* **NCAAM** - NCAA College Basketball (Division I)
+* **NCAAM_MM** - NCAA College Basketball (March Madness Tournament)
Each entry in your `sports` array is an object with two properties:
@@ -99,6 +100,10 @@ Each entry in your `sports` array is an object with two properties:
league
"NHL"
.String
label
showLeagueSeparators
is set to true
, you can optionally set a custom label for the separator. Useful in particular to show something other than "NCAAM_MM"
for the March Madness tournament.String
league
.teams
"TOR"
for Toronto Maple Leafs.Array
teams
and