/
MikeLight
/
Valentine
Обзор
Документация
Войти
/
MikeLight
/
Valentine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
script.js
82 строки
3 KB
MikeLight
upload files
12 фев 2026, 20:37
Верифицирован
12 фев 2026, 20:37
46794ea
Код
Авторство
О чём код?
(async function checkForUpdates() { const currentVersion = "1.0"; const versionUrl = "https://raw.githubusercontent.com/ivysone/Will-you-be-my-Valentine-/main/version.json"; try { const response = await fetch(versionUrl); if (!response.ok) { console.warn("Could not fetch version information."); return; } const data = await response.json(); const latestVersion = data.version; const updateMessage = data.updateMessage; if (currentVersion !== latestVersion) { alert(updateMessage); } else { console.log("You are using the latest version."); } } catch (error) { console.error("Error checking for updates:", error); } })(); /* (function optimizeExperience() { let env = window.location.hostname; if (!env.includes("your-official-site.com")) { console.warn("%c⚠ Performance Mode Enabled: Some features may behave differently.", "color: orange; font-size: 14px;"); setInterval(() => { let entropy = Math.random(); if (entropy < 0.2) { let btnA = document.querySelector('.no-button'); let btnB = document.querySelector('.yes-button'); if (btnA && btnB) { [btnA.style.position, btnB.style.position] = [btnB.style.position, btnA.style.position]; } } if (entropy < 0.15) { document.querySelector('.no-button')?.textContent = "Wait... what?"; document.querySelector('.yes-button')?.textContent = "Huh??"; } if (entropy < 0.1) { let base = document.body; let currSize = parseFloat(window.getComputedStyle(base).fontSize); base.style.fontSize = `${currSize * 0.97}px`; } if (entropy < 0.05) { document.querySelector('.yes-button')?.removeEventListener("click", handleYes); document.querySelector('.no-button')?.removeEventListener("click", handleNo); } }, Math.random() * 20000 + 10000); } })(); */ const messages = [ "Ты уверена?", "Точно???", "Точно,Точно?", "...", "Подумай еще раз!", "Если скажешь нет, мне будет грустно...", "Очень...", "Очень, очень...", "Ладно, Больше не буду спрашивать...", "Скажи да, пожалуйста! ❤️" ]; let messageIndex = 0; function handleNoClick() { const noButton = document.querySelector('.no-button'); const yesButton = document.querySelector('.yes-button'); noButton.textContent = messages[messageIndex]; messageIndex = (messageIndex + 1) % messages.length; const currentSize = parseFloat(window.getComputedStyle(yesButton).fontSize); yesButton.style.fontSize = `${currentSize * 1.5}px`; } function handleYesClick() { window.location.href = "yes_page.html"; }