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/index.html | 4 ++-- rannak/mangud/direktor/kone/script.js | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'rannak/mangud/direktor/kone') diff --git a/rannak/mangud/direktor/kone/index.html b/rannak/mangud/direktor/kone/index.html index 0406ee6..9b66b0e 100644 --- a/rannak/mangud/direktor/kone/index.html +++ b/rannak/mangud/direktor/kone/index.html @@ -52,7 +52,7 @@ 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