diff options
Diffstat (limited to 'rannak/endPage/main.js')
-rw-r--r-- | rannak/endPage/main.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/rannak/endPage/main.js b/rannak/endPage/main.js index 2813fc0..7f21f65 100644 --- a/rannak/endPage/main.js +++ b/rannak/endPage/main.js @@ -7,7 +7,6 @@ if (localStorage.roll != undefined){ delete localStorage.roll; if (roll == 'Kaitseliitlase'){ - console.log(span1); document.querySelector('h3').innerHTML = 'Baltiketti andmed:'; spans[1].innerHTML = 'Asula: ' + localStorage.asula; spans[2].innerHTML = 'Kaugus: ' + localStorage.kaugus; @@ -15,4 +14,17 @@ if (localStorage.roll != undefined){ delete localStorage.asula; delete localStorage.kaugus; } + + else if (roll == 'Direktori'){ + document.querySelector('h3').innerHTML = 'Baltiketti andmed:'; + spans[3].innerHTML = 'Baltiketi pikkus: ' + localStorage.teekond; + spans[1].innerHTML = 'Asula: ' + localStorage.asula; + spans[2].innerHTML = 'Kaugus: ' + localStorage.kaugus; + + console.log(localStorage.teekond); + + delete localStorage.asula; + delete localStorage.kaugus; + delete localStorage.teekond; + } } |