diff --git a/index.js b/index.js index bc59a67..d82071f 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ fetch("rankings.json").then(r=>r.json()) $("#season").appendChild(option); }); $("#season").onchange = load; - $("#season").value = "2024"; + $("#season").value = location.hash == '' ? 2024 : location.hash.substring(1); load(); }); @@ -76,6 +76,7 @@ function load() ]}; var year = parseInt($("#season").value); var yy = year+""+(year+1); + location.hash = year; for(var d = 0; d < 2; d++) query(d,"gameTypeId=2 and franchiseId in ("+seasons[year][d].join(",")+") and opponentFranchiseId in ("+seasons[year][d].join(",")+") and seasonId="+yy) .then(res=>{