-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstalador.php
57 lines (44 loc) · 1.29 KB
/
instalador.php
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
<!DOCTYPE html>
<html lang="en" manifest="cache.php">
<head>
<meta charset="UTF-8">
<title>Instalador</title>
<script>
var top = window.frames.top;
var logar = top.log;
var progresso = top.progresso;
window.addEventListener("load", function() {
applicationCache.addEventListener("checking", function(){
logar("Iniciando comunicação com o servidor");
});
applicationCache.addEventListener("noupdate", function(){
logar("Você já tem a última versão instalada");
});
applicationCache.addEventListener("cached", function(){
logar("Aplicativo instalado com sucesso");
});
applicationCache.addEventListener("updateready", function(){
logar("Aplicativo atualizado com sucesso");
});
applicationCache.addEventListener("error", function(){
logar("Houve um erro na instalação. Tente novamente");
});
applicationCache.addEventListener("downloading", function(){
logar("Download do aplicativo iniciado");
});
applicationCache.addEventListener("progress", function(event){
var parte = event.loaded;
var total = event.total;
var porcentagem = Math.floor((parte*100)/total);
logar("Baixando parte "+[parte, total].join(" de "));
progresso(porcentagem);
});
}, true);
</script>
</head>
<body>
<h1>Instalador</h1>
<script>
</script>
</body>
</html>