summaryrefslogtreecommitdiff
path: root/rannak/endPage
diff options
context:
space:
mode:
authorRasmus <rasmus.luha@gmail.com>2023-04-01 16:15:52 +0300
committerRasmus <rasmus.luha@gmail.com>2023-04-01 16:15:52 +0300
commitba837f70632519d58ae0f3f95bfad0dbb8051fc0 (patch)
tree3fc7d6b8715d4e7818d197d8408c791af28da608 /rannak/endPage
parent760e8fff4d4fd71350ddc9b17e85e95a17d4ce8e (diff)
Loosung ja Baltikett
Diffstat (limited to 'rannak/endPage')
-rw-r--r--rannak/endPage/index.html2
-rw-r--r--rannak/endPage/main.js14
2 files changed, 14 insertions, 2 deletions
diff --git a/rannak/endPage/index.html b/rannak/endPage/index.html
index 24b42a7..a3bcfc7 100644
--- a/rannak/endPage/index.html
+++ b/rannak/endPage/index.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title> Tehtud</title>
+ <title>Tehtud</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
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;
+ }
}