This commit is contained in:
2024-09-05 00:52:28 +01:00
parent 3c1c031986
commit 05961e2a3c
18 changed files with 126 additions and 19 deletions

View File

@@ -64,8 +64,9 @@ function hideUi() {
function update() {
fetchData().then(data => {
console.log(data);
if (data.item != null) {
hideUi();
updateUi(data);
}
else {
hideUi();

View File

@@ -1,9 +1,36 @@
const values = ["Web developer", "Pc games enjoyer", "Server backend survivor", "python programmer", "Javascript disliker"];
const values = [
"Web developer",
"Pc games enjoyer",
"Server backend survivor",
"python programmer",
"Javascript disliker",
"I use Arch btw",
"Owo, what's this?",
"Ultimate procrastinator",
"Ultrakill gaming",
"00111010 00110011",
"fistful of dollar",
"Thy end is now!!!",
"Possibly a furry",
"Prepare thyself!!!",
"Spegatti code master",
"Ethernet cable untangler",
"Caffeine addict",
"I'm not a robot ☑",
"Loud Music enjoyer",
"part time femboy :<",
];
var direction = 1;
var text = "";
var speed = 100;
var selectedValue = 0;
var currentValueIndex = 0;
var currentValueIndex = 0;
var pause = false;
function randomValue() {
selectedValue = Math.floor(Math.random() * values.length);
currentValueIndex = 0;
}
function type() {
if (direction == 1) {
@@ -12,7 +39,7 @@ function type() {
currentValueIndex++;
} else {
direction = -1;
speed = 1500;
pause = true;
}
} else {
if (currentValueIndex > 0) {
@@ -20,10 +47,7 @@ function type() {
currentValueIndex--;
} else {
direction = 1;
selectedValue++;
if (selectedValue >= values.length) {
selectedValue = 0;
}
randomValue();
}
}
}
@@ -36,7 +60,12 @@ function typing() {
} else {
speed = 60 + (Math.random() * 100) / 2;
}
setTimeout(typing, speed);
if (!pause) {
setTimeout(typing, speed);
} else {
setTimeout(typing, 500);
pause = false;
}
}
typing();