diff options
Diffstat (limited to 'rannak/mangud/direktor/kone/script.js')
-rw-r--r-- | rannak/mangud/direktor/kone/script.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rannak/mangud/direktor/kone/script.js b/rannak/mangud/direktor/kone/script.js index 91bdd44..1904623 100644 --- a/rannak/mangud/direktor/kone/script.js +++ b/rannak/mangud/direktor/kone/script.js @@ -3,24 +3,29 @@ document.addEventListener('DOMContentLoaded', () => { btn.click(); }); +let koneText = ''; const kone = document.querySelector(".kone"); kone.addEventListener('input', () => { let koneWordCount = document.querySelector(".kone").innerHTML.split(' ').length; - if (koneWordCount > 100) + koneText = event.target.innerHTML; + + if (koneWordCount > 50) moveOnEnable(); }) + // If Done function moveOnEnable(){ const btn = document.querySelector(".moveOn"); btn.disabled = false; localStorage.setItem("roll", "Direktori"); + localStorage.setItem("kone", koneText); btn.onclick = () => location.href = "../../../endPage"; } |