summaryrefslogtreecommitdiff
path: root/rannak/endPage/main.js
diff options
context:
space:
mode:
authorRasmus <rasmus.luha@gmail.com>2023-03-31 19:41:34 +0300
committerRasmus <rasmus.luha@gmail.com>2023-03-31 19:41:34 +0300
commit760e8fff4d4fd71350ddc9b17e85e95a17d4ce8e (patch)
treec7ea657fe7d99852ff3c5ea19ca386d69bd9af55 /rannak/endPage/main.js
parentc40293acd3a00b20d74cf37823b7efb1b75dec9b (diff)
oops
Diffstat (limited to 'rannak/endPage/main.js')
-rw-r--r--[-rwxr-xr-x]rannak/endPage/main.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/rannak/endPage/main.js b/rannak/endPage/main.js
index 1f4a3c5..2813fc0 100755..100644
--- a/rannak/endPage/main.js
+++ b/rannak/endPage/main.js
@@ -1,7 +1,18 @@
-let rollSpan = document.querySelector("span"); ;
+const spans = document.querySelectorAll("span");
if (localStorage.roll != undefined){
- rollSpan.innerHTML = localStorage.roll;
+
+ let roll = localStorage.roll;
+ spans[0].innerHTML = roll;
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;
+
+ delete localStorage.asula;
+ delete localStorage.kaugus;
+ }
+}