mirror of
https://github.com/JimenezJC/mshj_blog.git
synced 2026-03-07 23:34:36 -05:00
14 lines
No EOL
413 B
JavaScript
14 lines
No EOL
413 B
JavaScript
const miniHeader = document.getElementById('mini-header');
|
|
const texts = ['use linux', 'soup for my family', 'gpl everything']; // add your random text here
|
|
const text = texts[Math.floor(Math.random() * texts.length)];
|
|
let charIndex = 0;
|
|
|
|
function typeText() {
|
|
if (charIndex < text.length) {
|
|
miniHeader.textContent += text.charAt(charIndex);
|
|
charIndex++;
|
|
setTimeout(typeText, 50);
|
|
}
|
|
}
|
|
|
|
typeText(); |