🚎🍜 Checkpoint
./views/index.html:1954897/17146 ./public/script.js:1954897/18008 ./views/order-confirmed.svg:1954897/18089
This commit is contained in:
+10
-2
@@ -2,6 +2,7 @@
|
||||
'use strict'
|
||||
const wordBank = document.getElementById('wordBank')
|
||||
, input = document.getElementById('input')
|
||||
, listo = document.getElementById('listo')
|
||||
let prev = null
|
||||
let palabras = fetch('palabras.json').then(x => x.json())
|
||||
|
||||
@@ -41,13 +42,16 @@
|
||||
let b = document.createElement('button')
|
||||
b.classList.add('chip')
|
||||
b.innerText = word.p
|
||||
b.onclick = function () { input.value = this.innerText }
|
||||
b.onclick = function () {
|
||||
input.value = this.innerText;
|
||||
input.dispatchEvent(new Event('input'))
|
||||
}
|
||||
wordBank.appendChild(b)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
document.addEventListener('fs', (e) => {
|
||||
document.addEventListener('fs', e => {
|
||||
if (!screen.orientation.lock) return
|
||||
document
|
||||
.documentElement
|
||||
@@ -59,5 +63,9 @@
|
||||
})
|
||||
})
|
||||
|
||||
input.addEventListener('input', e => {
|
||||
listo.disabled = !input.value.trim()
|
||||
});
|
||||
|
||||
|
||||
}());
|
||||
Reference in New Issue
Block a user