remove unused file

This commit is contained in:
cjtheham 2023-01-30 13:30:46 -06:00
parent e27fbc792d
commit 4f04124938
1 changed files with 0 additions and 42 deletions

View File

@ -1,42 +0,0 @@
// Code from Benjamin Hollon (benjaminhollon@fosstodon.org)
const addCharDelay = 75;
const removeCharDelay = 45;
const wordDelay = 1500;
const typewriterElement = document.getElementById('typewriter');
const typewriterPrompts = [
'Amateur Radio Operator',
'Electrical Engineering Student',
'Film Enjoyer'
];
let currentTypewriterIndex = 0;
function typeNextPrompt() {
function typeChar(char) {
if (char !== '~') typewriterElement.innerText += char;
}
function removeChar() {
typewriterElement.innerText = typewriterElement.innerText.slice(0, -1);
}
const word = typewriterPrompts[currentTypewriterIndex];
let delaySoFar = 0;
// Type it
for (const char of word) {
setTimeout(typeChar.bind(this, char), delaySoFar);
delaySoFar += addCharDelay;
}
delaySoFar += wordDelay;
for (const char of word.split('').reverse()) {
setTimeout(removeChar, delaySoFar);
delaySoFar += removeCharDelay;
}
currentTypewriterIndex = (currentTypewriterIndex + 1) % typewriterPrompts.length;
setTimeout(typeNextPrompt, delaySoFar);
}
setTimeout(typeNextPrompt, wordDelay / 2);