regen
This commit is contained in:
parent
b84a93fead
commit
cb2b02e747
@ -240,7 +240,6 @@
|
|||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(json => {
|
.then(json => {
|
||||||
noms = json
|
noms = json
|
||||||
|
|
||||||
regen()
|
regen()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -252,11 +251,11 @@
|
|||||||
|
|
||||||
function regen() {
|
function regen() {
|
||||||
if (sigleInput.value.length) {
|
if (sigleInput.value.length) {
|
||||||
let listNoms = Array.from(sigleInput.value).map((lettre, position) => trouveMot(lettre, position))
|
let suggestion= Array.from(sigleInput.value).map((lettre, position) => trouveMot(lettre, position)).join(" ")
|
||||||
alertDiv.innerHTML = `
|
alertDiv.innerHTML = `
|
||||||
<div class="fr-alert fr-alert--info">
|
<div class="fr-alert fr-alert--info">
|
||||||
<p>Suggestion :</p>
|
<p>Suggestion :</p>
|
||||||
<h3 class="fr-alert__title" id="nomDiv">${listNoms.join(" ")}</h3>
|
<h3 class="fr-alert__title" id="nomDiv">${suggestion}</h3>
|
||||||
<button class="fr-btn--close fr-btn" title="Masquer le message" onclick="const alert = this.parentNode; alert.parentNode.removeChild(alert)">
|
<button class="fr-btn--close fr-btn" title="Masquer le message" onclick="const alert = this.parentNode; alert.parentNode.removeChild(alert)">
|
||||||
Masquer le message
|
Masquer le message
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user