summaryrefslogtreecommitdiff
path: root/rannak/mangud/direktor/kone/script.js
diff options
context:
space:
mode:
authorRasmus <rasmus.luha@gmail.com>2023-06-10 16:45:12 +0300
committerRasmus <rasmus.luha@gmail.com>2023-06-10 16:45:12 +0300
commitac3bfb7728e9324e6a21035e7b321649550c60cb (patch)
treee467ad4fcf4b83f1d6aa6f9d8613ee7d0534bfc9 /rannak/mangud/direktor/kone/script.js
parent562fd4eb2551cf26c19d619bdf00dbd965fb11d5 (diff)
finalFixes
Former-commit-id: 7fcc5cc7033804bb7e56b0ce5d3d77a6c2413236
Diffstat (limited to 'rannak/mangud/direktor/kone/script.js')
-rw-r--r--rannak/mangud/direktor/kone/script.js7
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";
}