🔒 Tailscale VPN
diff --git a/script.js b/script.js
index 0c948fe..8330d8d 100644
--- a/script.js
+++ b/script.js
@@ -368,7 +368,7 @@ function initLimitedTerminalTyping() {
let isTyping = false;
const typeCommand = () => {
- if (isTyping || cycleCount >= maxCycles) return;
+ if (isTyping) return;
isTyping = true;
const cmd = commands[currentCommand];
@@ -416,10 +416,11 @@ function initLimitedTerminalTyping() {
terminal.scrollTop = terminal.scrollHeight;
isTyping = false;
- currentCommand = (currentCommand + 1) % commands.length;
+ currentCommand++;
// Count completed cycles
- if (currentCommand === 0) {
+ if (currentCommand >= commands.length) {
+ currentCommand = 0;
cycleCount++;
}
}, 500);
@@ -429,15 +430,18 @@ function initLimitedTerminalTyping() {
typeChar();
};
- // Start typing effect every 6 seconds, but only for 3 cycles
- const intervalId = setInterval(() => {
+ // Start typing effect every 5 seconds - loops forever, clears after 3 cycles
+ setInterval(() => {
+ // Reset terminal after 3 cycles
if (cycleCount >= maxCycles) {
- clearInterval(intervalId);
- // Keep cursor blinking at the end
- return;
+ // Clear all dynamic content
+ const dynamicContent = terminal.querySelectorAll('.terminal-line:nth-child(n+4), .terminal-output');
+ dynamicContent.forEach(el => el.remove());
+ currentCommand = 0;
+ cycleCount = 0;
}
typeCommand();
- }, 6000);
+ }, 5000);
}
/**