only load set data if needed
This commit is contained in:
parent
c6ea364218
commit
cc15e46874
|
@ -20,10 +20,6 @@ flag = true
|
||||||
page = 1
|
page = 1
|
||||||
sets = {}
|
sets = {}
|
||||||
|
|
||||||
fetch('jsons/set.json')
|
|
||||||
.then((response) => response.json())
|
|
||||||
.then((data) => (sets = data))
|
|
||||||
|
|
||||||
window.console.log(sets)
|
window.console.log(sets)
|
||||||
document.location.search.split('&').forEach((pair) => {
|
document.location.search.split('&').forEach((pair) => {
|
||||||
let v = pair.split('=')
|
let v = pair.split('=')
|
||||||
|
@ -38,6 +34,12 @@ document.location.search.split('&').forEach((pair) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (whichGuesser === 'basic') {
|
||||||
|
fetch('jsons/set.json')
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((data) => (sets = data))
|
||||||
|
}
|
||||||
|
|
||||||
let firstFetch = fetch('jsons/' + whichGuesser + '.json')
|
let firstFetch = fetch('jsons/' + whichGuesser + '.json')
|
||||||
fetchToResponse(firstFetch)
|
fetchToResponse(firstFetch)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user