Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
83 lines (77 loc) · 2.92 KB
/
Copy pathscript.js
File metadata and controls
83 lines (77 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
(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 = [
"Kamu yakin?",
"Yakin banget nih?",
"Yakin bangeet bangett?",
"Bybub pleasee....",
"Maafin aku yaaa",
"If you say no, I will be really sad...",
"I will be very sad...",
"I will be very very very sad...",
"Ok fine, I will stop asking...",
"Just kidding, say yes please! ❤️",
];
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";
}