-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.html
35 lines (35 loc) · 1.14 KB
/
install.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title>今日の気分はバリいくつ? インストーラー</title>
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script>
$(function(){
$("#install").on("click", function(){
install();
});
});
var install = function() {
var manifestUrl = 'http://blog.bari-ikutsu.com/manifest.webapp';
var installLocFind = navigator.mozApps.install(manifestUrl);
installLocFind.onsuccess = function(data) {
// App is installed, do something if you like
};
installLocFind.onerror = function() {
// App wasn't installed, info is in
// installapp.error.name
alert(installLocFind.error.name);
};
};
</script>
</head>
<body>
<div class="container">
<h3>今日の気分はバリいくつ?<br/>Firefox OS インストーラー</h3>
<button id="install" class="btn btn-default btn-block">インストール</button>
</div>
</body>
</html>