🏃🚀 Checkpoint
./README.md:1954897/3016 ./server.js:1954897/5128 ./public/script.js:1954897/12752
This commit is contained in:
+5
-3
@@ -3,6 +3,7 @@
|
||||
const wordBank = document.getElementById('wordBank')
|
||||
, input = document.getElementById('input')
|
||||
let prev = null
|
||||
let palabras = fetch('palabras.json').then(x => x.json())
|
||||
|
||||
;[].forEach.call(
|
||||
document.querySelectorAll('[data-open]'),
|
||||
@@ -29,9 +30,10 @@
|
||||
}
|
||||
)
|
||||
|
||||
document.addEventListener('word', (e) => {
|
||||
// wordBank.innerHTML = ''
|
||||
wordBank.innerHTML = Math.random()
|
||||
document.addEventListener('word', async function () {
|
||||
let words = (await palabras)
|
||||
console.log(words)
|
||||
wordBank.innerHTML = words.words[~~(Math.random() * words.words.length)].p
|
||||
})
|
||||
|
||||
document.addEventListener('fs', (e) => {
|
||||
|
||||
Reference in New Issue
Block a user