🚎🍜 Checkpoint

./views/index.html:1954897/17146
./public/script.js:1954897/18008
./views/order-confirmed.svg:1954897/18089
This commit is contained in:
Glitch (tabu)
2019-07-01 13:22:05 +00:00
parent f3eb863cfc
commit 31be733dbb
3 changed files with 20 additions and 3 deletions
+10 -2
View File
@@ -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()
});
}());