-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
31 lines (28 loc) · 898 Bytes
/
script.js
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
27
28
29
30
31
// Animation
const text = "Enter the Vault...";
let index = 0;
const speed = 100;
const endDelay = 3000;
function typeWriter() {
if (index < text.length) {
document.getElementById("typewriter").innerHTML += text.charAt(index);
index++;
setTimeout(typeWriter, speed);
} else {
setTimeout(() => {
document.getElementById("typewriter").innerHTML = "";
index = 0;
typeWriter();
}, endDelay);
}
}
typeWriter();
// Download button
document.getElementById('downloadButton').addEventListener('click', function() {
var a = document.createElement('a');
a.href = 'https://maccram.github.io/Healthside/Downloads/Healthside_v1.0-Beta.zip';
a.download = 'Healthside_v1.0-Beta.zip';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
});