Disable random Card sort-order

This commit is contained in:
Andy Freer 2020-02-09 10:39:56 +00:00
parent 13e0ae1a4b
commit 42099b6885

View file

@ -17,12 +17,12 @@ const cards = Array.from(document.querySelectorAll('.Card'))
return 0 return 0
}) })
function randomizr () { // function randomizr () {
const cards = document.querySelector('.CardContainer') // const cards = document.querySelector('.CardContainer')
for (var i = cards.children.length; i >= 0; i--) { // for (var i = cards.children.length; i >= 0; i--) {
cards.appendChild(cards.children[Math.random() * i | 0]) // cards.appendChild(cards.children[Math.random() * i | 0])
} // }
} // }
function update (display) { function update (display) {
cards.forEach((c) => { cards.forEach((c) => {
@ -36,7 +36,7 @@ function update (display) {
}) })
} }
randomizr() // randomizr()
if (search) { if (search) {
search.classList.remove('dn') search.classList.remove('dn')