From ac3bfb7728e9324e6a21035e7b321649550c60cb Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 10 Jun 2023 16:45:12 +0300 Subject: finalFixes Former-commit-id: 7fcc5cc7033804bb7e56b0ce5d3d77a6c2413236 --- rannak/mangud/direktor/kone/script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rannak/mangud/direktor/kone/script.js') 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"; } -- cgit v1.2.3