-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
73 lines (69 loc) · 3.64 KB
/
index.html
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
<!DOCTYPE html>
<html>
<body>
<button onclick="lotsOfWishes()">Click me me me please!!!!!!!!</button>
<p id="lotsOfWishes"></p>
<br><br>
<button onclick="FiniteWishes()">Wait ...............That's a lot of wishes bro!</button>
<p id="finiteWish"></p>
<br><br>
<button onclick="bumpMe()">Curious what's next ?????</button>
<p id="bumps"></p>
<br><br>
<script>
class Year {
constructor(age) {
this.feelings = ["bliss","contentment","delight","elation","enjoyment","euphoria","exhilaration","glee","joy","jubilation","laughter","optimism","peace of mind","pleasure","prosperity","well-being","beatitude","blessedness","cheer","cheerfulness","delectation","delirium","ecstasy","enchantment","exuberance","felicity","gaiety","geniality","gladness","hilarity","hopefulness","joviality","lightheartedness","merriment","mirth","paradise","playfulness","rejoicing","sanctity","amusing","enjoyable","entertaining","lively","pleasant","boisterous","convivial","diverting","merry","witty","affection","appreciation","devotion","emotion","fondness","friendship","infatuation","lust","passion","respect","taste","tenderness","yearning","adulation","allegiance","amity","amorousness","amour","ardor","attachment","case","cherishing","crush","delight","devotedness","enchantment","enjoyment","fervor","fidelity","flame","hankering","idolatry","inclination","involvement","like","partiality","piety","rapture","regard","relish","sentiment","weakness","worship","zeal","ardency","mad for","soft spot","appreciation","awe","consideration","deference","dignity","esteem","fear","honor","recognition","regard","reverence","tribute","account","adoration","approbation","courtesy","estimation","favor","homage","obeisance","ovation","repute","testimonial","veneration","worship"];
this.age = age;
}
wishHappyBirthday() {
var wish = ""
wish += "Wish you lot of Love\n";
for (var years = 1; years <= (10* this.age); years++) {
var randInt = Math.floor(Math.random()*this.feelings.length+1);
wish += ", " + this.feelings[randInt]
}
return wish;
}
FiniteWishMe(){
var wish = ""
wish += "Basically wishing you lot of THINGS in current and coming years....";
wish += "Happyyyyyyyyyyyyyy Birthdayyyyyyyyyyy To you <NAME>"; // add name of the person
return wish;
}
bumps(){
var wish = ""
wish +="And definitely " + this.age + " birthday bumps!!!!!!"
return wish;
}
}
var i=0,j=0,k=0;
var speed = 50;
var Hooman = new Year(28); // Value of age
var wishText = Hooman.wishHappyBirthday();
function lotsOfWishes() {
if (i < wishText.length) {
document.getElementById("lotsOfWishes").innerHTML += wishText.charAt(i);
i++;
setTimeout(lotsOfWishes, 10);
}
}
var finiteWish = Hooman.FiniteWishMe()
function FiniteWishes() {
if (j < finiteWish.length) {
document.getElementById("finiteWish").innerHTML += finiteWish.charAt(j);
j++;
setTimeout(FiniteWishes, 30);
}
}
var bumpWish = Hooman.bumps()
function bumpMe() {
if (k < bumpWish.length) {
document.getElementById("bumps").innerHTML += bumpWish.charAt(k);
k++;
setTimeout(bumpMe, 50);
}
}
</script>
</body>
</html>