location.hash

This commit is contained in:
Yuki 2024-12-11 12:52:47 -05:00
parent 0f77ed0503
commit 7a23ae28d6
1 changed files with 2 additions and 1 deletions

View File

@ -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=>{