location.hash
This commit is contained in:
parent
0f77ed0503
commit
7a23ae28d6
3
index.js
3
index.js
|
@ -11,7 +11,7 @@ fetch("rankings.json").then(r=>r.json())
|
||||||
$("#season").appendChild(option);
|
$("#season").appendChild(option);
|
||||||
});
|
});
|
||||||
$("#season").onchange = load;
|
$("#season").onchange = load;
|
||||||
$("#season").value = "2024";
|
$("#season").value = location.hash == '' ? 2024 : location.hash.substring(1);
|
||||||
load();
|
load();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ function load()
|
||||||
]};
|
]};
|
||||||
var year = parseInt($("#season").value);
|
var year = parseInt($("#season").value);
|
||||||
var yy = year+""+(year+1);
|
var yy = year+""+(year+1);
|
||||||
|
location.hash = year;
|
||||||
for(var d = 0; d < 2; d++)
|
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)
|
query(d,"gameTypeId=2 and franchiseId in ("+seasons[year][d].join(",")+") and opponentFranchiseId in ("+seasons[year][d].join(",")+") and seasonId="+yy)
|
||||||
.then(res=>{
|
.then(res=>{
|
||||||
|
|
Loading…
Reference in New Issue