// Glitch text effect loop (runs safely for the text display) (function() { var el = document.getElementById('horror-tape-output'); if (!el) return; var charset = "0101010101#@!$%&*-_+XYZ_ERROR"; var phrases = [ "THEY ARE BEHIND YOU", "DO NOT LOOK BACK", "IT SEES EVERYTHING", "NO ESCAPE", "PLAYING TAPE..." ]; setTimeout(function() { var phraseIndex = 0; setInterval(function() { var currentTarget = phrases[phraseIndex]; var result = ""; for (var i = 0; i < currentTarget.length; i++) { var char = currentTarget[i]; if (char === " ") { result += " "; } else if (Math.random() < 0.35) { result += charset[Math.floor(Math.random() * charset.length)]; } else { result += char; } } el.innerText = result; if (Math.random() < 0.12) { phraseIndex = (phraseIndex + 1) % phrases.length; } }, 45); }, 2500); })();
SYNCING...CH 00
(function() { function updateVHSClock() { var clockElement = document.getElementById('vhs-live-clock'); if (!clockElement) return; try { var now = new Date(); if (isNaN(now.getTime())) { throw new Error("Invalid time"); } var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds(); var ampm = hours >= 12 ? 'PM' : 'AM'; hours = hours % 12; hours = hours ? hours : 12; minutes = minutes < 10 ? '0' + minutes : minutes; seconds = seconds < 10 ? '0' + seconds : seconds; var timeString = hours + ':' + minutes + ':' + seconds + ' ' + ampm; if (clockElement.innerText === "SYNCING..." || !clockElement.classList.contains('vhs-intro-anim')) { clockElement.innerText = timeString; } if (Math.random() < 0.12 && !clockElement.classList.contains('vhs-intro-anim')) { clockElement.classList.add('glitching-clock'); setTimeout(function() { clockElement.classList.remove('glitching-clock'); }, 300); } } catch (e) { clockElement.innerText = "TIME UNAVAILABLE"; clockElement.style.letterSpacing = "1px"; } } setTimeout(function() { var clockElement = document.getElementById('vhs-live-clock'); if (clockElement) { clockElement.classList.remove('vhs-intro-anim'); updateVHSClock(); } }, 1000); updateVHSClock(); setInterval(updateVHSClock, 1000); })();
KILL COUNT
Edibles has been taken by Eleska.
(function() { var messages = [ "Edibles has been taken by Eleska.", "Envy has been ticked.", "Gloria has been touched." ]; var currentIndex = 0; var box = document.getElementById('vhs-kill-notification'); var textElement = document.getElementById('vhs-noti-text'); if (!box || !textElement) return; function updateText() { currentIndex = (currentIndex + 1) % messages.length; textElement.innerText = messages[currentIndex]; } // Changes the text precisely when the animation loop finishes and resets box.addEventListener('animationiteration', updateText); // Backup interval in case the browser throttles animation events setInterval(updateText, 12000); })();
Cat Walking Across a Heart Loading Bar
UNDER CONSTRUCTION
const progressBar = document.getElementById('progressBar'); const catContainer = document.getElementById('catContainer'); const barWrapper = document.getElementById('barWrapper'); const loadingText = document.getElementById('loadingText'); const actionBtn = document.getElementById('actionBtn'); let state = 'idle'; // idle, loading, loaded, reset function setProgress(percent) { progressBar.style.width = percent + '%'; // Offset the cat wrapper so it aligns right at the tip of the progress bar catContainer.style.left = percent + '%'; catContainer.style.transform = `translateX(-${20 + (percent * 0.6)}%)`; } async function startRealLoad() { if (state === 'loaded') { // Reset back to idle state = 'idle'; setProgress(0); loadingText.textContent = "UNDER CONSTRUCTION"; actionBtn.textContent = "START LOADING"; return; } if (state === 'loading') return; state = 'loading'; actionBtn.disabled = true; loadingText.textContent = "CONNECTING..."; barWrapper.classList.add('loading'); setProgress(5); try { // Example of an actual network request using fetch streams or a chunked payload simulator. // We will perform a real fetch to a public JSON endpoint to actually download data. loadingText.textContent = "FETCHING DATA..."; setProgress(25); const response = await fetch('https://jsonplaceholder.typicode.com/photos'); if (!response.ok) throw new Error('Network response was not ok'); setProgress(50); loadingText.textContent = "PROCESSING..."; const reader = response.body.getReader(); let receivedLength = 0; let chunks = []; // Read chunks of data dynamically to show real download progress while(true) { let {done, value} = await reader.read(); if (done) break; chunks.push(value); receivedLength += value.length; // Simulating curve progress up to 90% based on incoming data chunks let simulatedProgress = Math.min(90, 50 + (receivedLength / 150000)); setProgress(simulatedProgress); } setProgress(100); loadingText.textContent = "READY!"; state = 'loaded'; barWrapper.classList.remove('loading'); actionBtn.textContent = "RESET"; actionBtn.disabled = false; } catch (error) { console.error(error); loadingText.textContent = "LOADING FAILED"; barWrapper.classList.remove('loading'); actionBtn.textContent = "RETRY"; actionBtn.disabled = false; state = 'idle'; } }