-
Notifications
You must be signed in to change notification settings - Fork 2
/
script.js
34 lines (34 loc) · 1.06 KB
/
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
32
33
34
let files = [];
for (let code of Object.keys(codes)) {
let anchor = document.createElement("a");
anchor.href = "https://status.pizza/" + code;
anchor.setAttribute("target", "_blank");
let content = document.createElement("content");
let image = document.createElement("img");
image.src = "img/" + code + ".png";
image.draggable = false;
content.appendChild(image);
let disp = document.createElement("span");
disp.innerHTML = code;
content.appendChild(disp);
let desc = document.createElement("span");
desc.innerHTML = codes[code];
content.appendChild(desc);
anchor.appendChild(content);
document.getElementById("ship").appendChild(anchor);
files.push(code);
}
new Typed("#code", {
strings: files,
shuffle: true,
typeSpeed: 100,
backSpeed: 50,
smartBackspace: false,
loop: true,
backDelay: 2500
});
document.getElementById("scroll").addEventListener("click", () => {
document.getElementById("pizza").scrollIntoView({
behavior: "smooth"
});
});