mirror of
https://codeberg.org/metamuffin/abrechenbarkeit.git
synced 2024-12-29 16:14:36 +00:00
10 lines
347 B
JavaScript
10 lines
347 B
JavaScript
/// <reference lib="dom" />
|
|
|
|
document.addEventListener("keypress", ev => {
|
|
if (!(document.activeElement instanceof HTMLInputElement)) {
|
|
if (ev.code.startsWith("Digit"))
|
|
document.forms.buy_product.product.value += ev.code.substring(5)
|
|
if (ev.code == "Enter")
|
|
document.forms.buy_product.submit()
|
|
}
|
|
})
|