diff --git a/main.css b/main.css
index 2869691..50ca54a 100644
--- a/main.css
+++ b/main.css
@@ -2,5 +2,4 @@ body {
background-color: black;
color: #0f0;
font-family: monospace;
- font-size: 3rem;
}
diff --git a/main.js b/main.js
index 267a8a3..a469782 100644
--- a/main.js
+++ b/main.js
@@ -3,7 +3,7 @@ const minute = second*60;
const hour = minute*60;
const day = hour*24;
-const countdown = (target) => {
+const countdown = (target, heading) => {
const now = new Date();
const diff = target - now;
@@ -21,16 +21,18 @@ const countdown = (target) => {
});
return `
-${formatted[0]} Days
-${formatted[1]} Hours
-${formatted[2]} Minutes
-${formatted[3]} Seconds
+${formatted[0]} Days
+${formatted[1]} Hours
+${formatted[2]} Minutes
+${formatted[3]} Seconds
`;
};
const hash_date = new Date(location.hash.substr(1))
const update_all = () => {
- document.getElementById('output').innerHTML = countdown(hash_date);
+ let i = 1
+ const date_list = location.hash.split('#').slice(1).map((fragment) => {return new Date(fragment)})
+ document.getElementById('output').innerHTML = countdown(date_list[0], i);
}
update_all();
setInterval(update_all, 500);