hacked fix for removing image from name
This commit is contained in:
parent
cc15e46874
commit
2f795fd7de
|
@ -246,9 +246,13 @@ function checkAnswers() {
|
||||||
currCard = document.getElementById('card-' + cardIndex)
|
currCard = document.getElementById('card-' + cardIndex)
|
||||||
let incorrect = true
|
let incorrect = true
|
||||||
if (currCard.dataset.name) {
|
if (currCard.dataset.name) {
|
||||||
let guess = document.getElementById(currCard.dataset.name).innerText
|
// remove image text
|
||||||
// window.console.log(artDict[currCard.dataset.url][0], guess);
|
let guess = document
|
||||||
incorrect = artDict[currCard.dataset.url][0] !== guess
|
.getElementById(currCard.dataset.name)
|
||||||
|
.innerText.split('>')
|
||||||
|
let ans = artDict[currCard.dataset.url][0].split('>')
|
||||||
|
window.console.log(ans, guess)
|
||||||
|
incorrect = ans[ans.length - 1] !== guess[guess.length - 1]
|
||||||
// decide if their guess was correct
|
// decide if their guess was correct
|
||||||
}
|
}
|
||||||
if (incorrect) currCard.classList.add('incorrect')
|
if (incorrect) currCard.classList.add('incorrect')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user