forked from willpoqigithub/bemyvalentine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
27 lines (24 loc) · 827 Bytes
/
script.js
File metadata and controls
27 lines (24 loc) · 827 Bytes
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
const messages = [
"Are you sure?",
"Really sure??",
"Are you positive?",
"Baby please...",
"Just think about it!",
"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";
}