-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake-it-perfect.js
35 lines (31 loc) · 1.16 KB
/
make-it-perfect.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
var persentage = 0;
var fink, min = -5, max = 5;
var progress = function(){
if(persentage < fink){
$('#progress-value').text((persentage++)+'%');
setTimeout(progress, 117);
}
}
var makePerfect = function(){
fink = 85 - (Math.random() * (max - min) + min);
$('#action').css('visibility', 'visible');
$('#progress').css({ width: "0%" });
persentage = 0;
progress();
$('#action p').html('Подождите. Делаеться пиздато.');
$('#progress').animate({ width: fink+"%" }, 10000 );
$('#progress').fadeTo(100, 0.35, function(){
persentage = fink;
});
$('#progress').fadeTo(100, 1);
$('#progress').fadeTo(100, 0.35);
$('#progress').fadeTo(100, 1);
$('#progress').fadeTo(100, 0.35);
$('#progress').fadeTo(100, 1, function(){
alert('Приложение обратилось по адресу #1b14c426v:0008, выполнило недопустимую операцию и будет прервано.');
$('#action p').html('<span><span class="female">Пиздато</span> не получилось. Получилось <span class="male">хуёво</span>.</span>');
});
}
$(document).ready(function(){
$('#do-it').click(makePerfect);
});