summaryrefslogtreecommitdiff
path: root/rannak/mangud/direktor/kone/script.js
blob: 91bdd4435df59cbef74aa183efe6d20784308e7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
document.addEventListener('DOMContentLoaded', () => {
    let btn = document.querySelector('.modalButton');
    btn.click();
});



const kone = document.querySelector(".kone");
kone.addEventListener('input', () => {
    let koneWordCount = document.querySelector(".kone").innerHTML.split(' ').length;
    
    if (koneWordCount > 100)
        moveOnEnable();
})



// If Done

function moveOnEnable(){
    const btn = document.querySelector(".moveOn");
    btn.disabled = false;
    localStorage.setItem("roll", "Direktori");
    btn.onclick = () => location.href = "../../../endPage";
}