diff options
author | Rasmus <rasmus.luha@gmail.com> | 2023-06-10 16:45:12 +0300 |
---|---|---|
committer | Rasmus <rasmus.luha@gmail.com> | 2023-06-10 16:45:12 +0300 |
commit | ac3bfb7728e9324e6a21035e7b321649550c60cb (patch) | |
tree | e467ad4fcf4b83f1d6aa6f9d8613ee7d0534bfc9 /rannak/mangud/direktor/kone/script.js | |
parent | 562fd4eb2551cf26c19d619bdf00dbd965fb11d5 (diff) |
finalFixes
Former-commit-id: 7fcc5cc7033804bb7e56b0ce5d3d77a6c2413236
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"; } |