-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
116 lines (103 loc) · 3.54 KB
/
script.js
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
document.addEventListener("DOMContentLoaded", function () {
// Get all elements with class "image1"
var images = document.querySelectorAll(".image1");
// Function to set random position for an element
function setRandomPosition(element) {
element.style.top = Math.floor(Math.random() * window.innerHeight) + "px";
element.style.left = Math.floor(Math.random() * window.innerWidth) + "px";
}
// Set random position for each image
images.forEach(function (image) {
setRandomPosition(image);
});
});
function angry() {
// get all image with class image1 and change the src
var images = document.querySelectorAll(".image1");
var absImg = document.getElementById("absImg");
var mainImg = document.getElementById("mainImg");
mainImg.src = "./resources/sad1.gif";
absImg.style.display = "flex";
images.forEach(function (image) {
image.src = "./resources/sad.gif";
});
}
function happy() {
// get all image with class image1 and change the src
var images = document.querySelectorAll(".image1");
var absImg = document.getElementById("absImg");
absImg.style.display = "flex";
var mainImg = document.getElementById("mainImg");
mainImg.src = "./resources/happy3.gif";
images.forEach(function (image) {
image.src = "./resources/heart.gif";
});
}
const sadCat = [
"https://media1.tenor.com/images/9413ffc5a11722a3cc456a88810750bd/tenor.gif?itemid=14193216",
"https://emoji.gg/assets/emoji/5228_cat_cri.gif",
"https://media1.tenor.com/images/a0554662ae7c3c60c0a7fdadac74ef18/tenor.gif?itemid=13931206",
"https://media3.giphy.com/media/qpCvOBBmBkble/giphy.gif",
"https://c.tenor.com/fpIAhF2jIY0AAAAC/cat-crying.gif",
"https://c.tenor.com/BP70qe8X0J8AAAAC/crycat-crying-cat.gif",
];
const blackmail = [
"Please",
"I'm begging you",
"I'm crying",
"I'm sad",
"HUHUHUHU",
"Please Say Yes",
"I'm gonna cry",
];
function normal() {
var absImg = document.getElementById("absImg");
absImg.style.display = "none";
var mainImg = document.getElementById("mainImg");
mainImg.src = "./resources/happy1.gif";
}
let counter = 0;
function no() {
counter++;
let sadMusic = document.getElementById("sadMusic");
let happyMusic = document.getElementById("happyMusic");
happyMusic.pause();
sadMusic.play();
let model = document.getElementById("model");
model.style.display = "none";
setTimeout(() => {
model.style.display = "flex";
const modelImage = document.getElementById("modelImg");
const modelText = document.getElementById("modelText");
modelImage.src = sadCat[Math.floor(Math.random() * sadCat.length)];
modelText.innerText =
blackmail[Math.floor(Math.random() * blackmail.length)];
}, 100);
}
function yes() {
if (counter >= 3) {
let model = document.getElementById("model2");
let model2 = document.getElementById("model");
let sadMusic = document.getElementById("sadMusic");
sadMusic.pause();
model2.style.display = "none";
let happyMusic = document.getElementById("happyMusic");
happyMusic.play();
model.style.display = "none";
setTimeout(() => {
model.style.display = "flex";
}, 100);
const wedate = document.getElementById("wedate");
const btns = document.getElementById("btns");
btns.style.display = "none";
wedate.innerText = "We are dating now. I love you cutie.";
} else {
alert("Kuch to Bhao khao cutie. Sidhe yes mat bola karo.");
}
}
function ly2() {
let model = document.getElementById("model2");
model.style.display = "none";
let model2 = document.getElementById("model");
model2.style.display = "none";
}