small changes
This commit is contained in:
parent
46c2782e4e
commit
affa958ab8
12
js/index.js
12
js/index.js
@ -29,12 +29,6 @@ function getKey(action) {
|
||||
return key
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
document.getElementById("actions").innerHTML = actionLabel.map(action => `<div>${action.label}</div>
|
||||
<button type="button" onclick="changeKey(this, '${action.name}')">${getKey(action.name)}</button>
|
||||
`).join("\n")
|
||||
}
|
||||
|
||||
function changeKey(button, action) {
|
||||
button.innerHTML = "Touche ?"
|
||||
selectedButton = button
|
||||
@ -50,4 +44,10 @@ function keyUpHandler(e) {
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
document.getElementById("actions").innerHTML = actionLabel.map(action => `<div>${action.label}</div>
|
||||
<button type="button" onclick="changeKey(this, '${action.name}')">${getKey(action.name)}</button>
|
||||
`).join("\n")
|
||||
|
||||
addEventListener("keyup", keyUpHandler, false)
|
||||
}
|
Reference in New Issue
Block a user