Skip to content

Commit

Permalink
Added UMHL 2023 for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
weakbox committed Jul 25, 2024
1 parent 5acf384 commit 02093c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ <h1><strong>Stick & Puck Fantasy Dashboard</strong></h1>
</header>

<div class="button-container">
<button id="umhl-year-select-2023" class="year-button">2023 UMHL</button>
<button id="umhl-year-select-2025" class="year-button">2025 UMHL</button>
<button id="year-select-2024" class="year-button">2024</button>
<button id="doaktown-year-select-2024" class="year-button">2025 UMHL League</button>
<button id="year-select-2025" class="year-button">2025 (Upcoming Season)</button>
</div>

Expand Down
12 changes: 5 additions & 7 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
const result = document.getElementById("result");

const stickAndPuckLeagueId = "869377698";
const doaktownLeagueId = "1017266493";
const umhlLeagueId = "1017266493";

setupYearSelectButton("umhl-year-select-2023", 2023, umhlLeagueId);
setupYearSelectButton("umhl-year-select-2025", 2025, umhlLeagueId);
setupYearSelectButton("year-select-2024", 2024, stickAndPuckLeagueId);
setupYearSelectButton("doaktown-year-select-2024", 2025, doaktownLeagueId);
setupYearSelectButton("year-select-2025", 2025, stickAndPuckLeagueId);

let scheduleCache = {};
let leagueId = stickAndPuckLeagueId;
let globalYear = 2024;
let globalYear = 2025;

fetchScheduleData(globalYear, leagueId);

Expand Down Expand Up @@ -90,7 +91,6 @@ async function fetchScheduleData(year, leagueId)
function updateCache(leagueId, year, data)
{
scheduleCache[`${leagueId}-${year}`] = data;
console.log(`${leagueId}-${year}`);
console.log("Cache updated:", scheduleCache);
}

Expand All @@ -102,7 +102,6 @@ function fetchFromCache(leagueId, year)
{
console.log(`Data was found in cache.`);
}
console.log(leagueId, year);
return result;
}

Expand Down Expand Up @@ -494,8 +493,7 @@ function getMatchupPeriodLengths(data, year)

matchupPeriodInfo.push(info);
}

console.log("For Debug:", scheduleCache);

fetchFromCache(leagueId, year)['matchupPeriodInfo'] = matchupPeriodInfo;
}

Expand Down

0 comments on commit 02093c6

Please sign in to comment.