-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
23 lines (19 loc) · 898 Bytes
/
Copy pathscript.js
File metadata and controls
23 lines (19 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const message = `I don’t even know if you’ll ever read this.\nBut if you do… I just want you to know I’m thankful, whoever you are.\n\nThanks for checking my link.\nIt might seem like something small, but it means more than you think.\n\nSo if you’re still here…\nmaybe stay a little longer.\nBe my forever story viewer.`;
function showLetter() {
document.getElementById("introText").style.opacity = 0;
document.querySelector(".btn").style.display = "none";
setTimeout(() => {
const letterBox = document.getElementById("letterBox");
const typedText = document.getElementById("typedText");
letterBox.style.display = "block";
let i = 0;
function typeWriter() {
if (i < message.length) {
typedText.innerHTML += message.charAt(i);
i++;
setTimeout(typeWriter, 30);
}
}
typeWriter();
}, 600);
}