-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
132 lines (131 loc) · 5.69 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
var loadingPage = {
animationIntervals: function(){
loadingPage.animationTimeouts[loadingPage.animationTimeouts.length] = setTimeout(function(){
loadingPage.selector('#zod #firstline').hide();
loadingPage.selector('#zod #endline').show();
},3000);
loadingPage.animationTimeouts[loadingPage.animationTimeouts.length] = setTimeout(function(){
loadingPage.selector('#zod #zodtalking').hide();
loadingPage.selector('#zod #firstline,#zod #midline,#zod #endline').hide();
loadingPage.selector('#zod #smilemouth').show();
},6000);
loadingPage.animationInterval = setInterval(function(){
loadingPage.selector('#zod #smilemouth').hide();
loadingPage.selector('#zod #zodtalking').show();
loadingPage.selector('#zod #firstline').show();
loadingPage.animationTimeouts[loadingPage.animationTimeouts.length] = setTimeout(function(){
loadingPage.selector('#zod #firstline').hide();
loadingPage.selector('#zod #endline').show();
},3000);
loadingPage.animationTimeouts[loadingPage.animationTimeouts.length] = setTimeout(function(){
loadingPage.selector('#zod #zodtalking').hide();
loadingPage.selector('#zod #firstline,#zod #midline,#zod #endline').hide();
loadingPage.selector('#zod #smilemouth').show();
},6000);
},9000);
},
animationTimeouts: [],
complete: [],
count: 0,
loaded: function(loaded_count){
if(loadingPage.count>=100) return false;
loadingPage.count=Math.floor(loaded_count);
if(loadingPage.count>100) loadingPage.count=100;
document.title='['+loadingPage.count+'%] '+loadingPage.originalTitle;
loadingPage.selector('#loading-wrap').width(loadingPage.count*(304/100));
if(loadingPage.count>=90 && !loadingPage.parts['90']){
loadingPage.parts['90']=true;
loadingPage.selector('#zod #endline,#zod #zodtalking').show();
loadingPage.selector('#zod #closemouth').hide();
$.each(loadingPage.partTimeout,function(a){
clearTimeout(loadingPage.partTimeout[a]);
});
loadingPage.partTimeout[loadingPage.partTimeout.length]=setTimeout(function(){
loadingPage.selector('#zod #endline').addClass('goodbye');
setTimeout(function(){
loadingPage.selector('#zod #endline').removeClass('goodbye').hide();
},500);
loadingPage.selector('#zod #zodtalking').hide();
loadingPage.selector('#zod #closemouth').show();
},2000);
}else if(loadingPage.count>=60 && !loadingPage.parts['60']){
loadingPage.parts['60']=true;
loadingPage.selector('#zod #midline,#zod #zodtalking').show();
loadingPage.selector('#zod #closemouth').hide();
$.each(loadingPage.partTimeout,function(a){
clearTimeout(loadingPage.partTimeout[a]);
});
loadingPage.partTimeout[loadingPage.partTimeout.length]=setTimeout(function(){
loadingPage.selector('#zod #midline').addClass('goodbye');
setTimeout(function(){
loadingPage.selector('#zod #midline').removeClass('goodbye').hide();
},500);
loadingPage.selector('#zod #zodtalking').hide();
loadingPage.selector('#zod #closemouth').show();
},2000);
}else if(loadingPage.count>=20 && !loadingPage.parts['20']){
loadingPage.parts['20']=true;
loadingPage.selector('#zod #firstline,#zod #zodtalking').show();
loadingPage.selector('#zod #closemouth').hide();
$.each(loadingPage.partTimeout,function(a){
clearTimeout(loadingPage.partTimeout[a]);
});
loadingPage.partTimeout[loadingPage.partTimeout.length]=setTimeout(function(){
loadingPage.selector('#zod #firstline').addClass('goodbye');
setTimeout(function(){
loadingPage.selector('#zod #firstline').removeClass('goodbye').hide();
},500);
loadingPage.selector('#zod #zodtalking').hide();
loadingPage.selector('#zod #closemouth').show();
},2000);
}
if(loadingPage.count>=100){
loadingPage.selector('#zod #zodtalking,#zod #closemouth,#zod #firstline,#zod #midline,#zod #endline').hide();
loadingPage.selector('#zod #smilemouth').show();
$.each(loadingPage.partTimeout,function(a){
clearTimeout(loadingPage.partTimeout[a]);
});
setTimeout(function(){
loadingPage.selector().addClass('loaded');
loadingPage.selector('#zod *:visible').fadeOut('slow');
setTimeout(function(){
loadingPage.selector().fadeOut('slow');
document.title=loadingPage.originalTitle;
$.each(loadingPage.complete,function(a){
loadingPage.complete[a].call();
});
},500);
},1000);
}
},
originalTitle: document.title,
parts: [],
partTimeout: [],
reset: function(){
loadingPage.parts=[];
loadingPage.selector().removeClass('loaded');
loadingPage.selector().fadeIn('slow');
loadingPage.selector('#zod,#zod *').hide();
loadingPage.selector('#zod #closemouth').show();
loadingPage.selector('#zod').fadeIn('slow',function(){
loadingPage.selector('#zod #firstline').hide();
loadingPage.selector('#zod #endline').show();
});
loadingPage.count=0;
document.title='[0%] '+loadingPage.originalTitle;
loadingPage.selector().addClass('resetting');
loadingPage.selector('#loading-wrap').width(0);
setTimeout(function(){loadingPage.selector().removeClass('resetting');},50);
},
selector: function(selector_find){
var r = $('#loading');
if(selector_find) r=r.find(selector_find);
return r;
}
};
loadingPage.complete[loadingPage.complete.length] = function(){
clearInterval(loadingPage.autoInterval);
};
loadingPage.autoInterval = setInterval(function(){
loadingPage.loaded(Math.floor(loadingPage.count+(Math.random()*10)));
},600);