This repository has been archived by the owner on Sep 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
134 lines (87 loc) · 2.95 KB
/
main.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
function GetURLParameter(sParam) {
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam) {
return sParameterName[1];
}
}
};
var opacity4 = 0;
function MyFadeFunction4() {
if (opacity4 < 1) {
opacity4 += .1;
setTimeout(function() { MyFadeFunction4() }, 100);
}
document.getElementById('text4').style.opacity = opacity4;
}
var opacity3 = 0;
function MyFadeFunction3() {
if (opacity3 < 1) {
opacity3 += .1;
setTimeout(function() { MyFadeFunction3() }, 100);
}
document.getElementById('text3').style.opacity = opacity3;
}
var opacity2 = 0;
function MyFadeFunction2() {
if (opacity2 < 1) {
opacity2 += .1;
setTimeout(function() { MyFadeFunction2() }, 100);
}
document.getElementById('text2').style.opacity = opacity2;
}
var opacity = 0;
function MyFadeFunction() {
if (opacity < 1) {
opacity += .1;
setTimeout(function() { MyFadeFunction() }, 100);
}
document.getElementById('text').style.opacity = opacity;
}
function gifTime() {
let box = document.getElementById('box')
box.src = "https://i.postimg.cc/SxkvLdpJ/openingbox.gif"
window.setTimeout(function() {
MyFadeFunction()
}, 700);
window.setTimeout(function() {
MyFadeFunction2()
}, 700);
window.setTimeout(function() {
MyFadeFunction3()
}, 700);
window.setTimeout(function() {
MyFadeFunction4()
}, 700);
}
function setcustoms() {
let to = decodeURI(GetURLParameter('to'))
let from = decodeURI(GetURLParameter('from'))
let message = decodeURI(GetURLParameter('msg'))
let customImage = decodeURI(GetURLParameter('img'))
let hbd = document.getElementById('text')
hbd.innerHTML = "Happy Birthday " + to + '!'
let msge = document.getElementById('text2')
msge.innerHTML = message
let frome = document.getElementById('text3')
frome.innerHTML = from
let btmimg = document.getElementById('text4')
btmimg.src = customImage
let title = document.getElementById('title')
title.innerHTML = 'Happy Birthday ' + to + '!'
}
function generateLink() {
let elf = document.getElementById('from')
let elt = document.getElementById('to')
let elm = document.getElementById('message')
let eli = document.getElementById('imageurl')
let elfv = elf.value
let eltv = elt.value
let elmv = elm.value
let eliv = eli.value
// Main
let link = 'bluefalconhd.github.io/bdayMessageGenerator/index.html?to=' + eltv + '&from=' + elfv + '&msg=' + elmv + '&img=' + eliv
document.getElementById('link').innerHTML = link
}