forked from buildingfirefoxos/Building-Blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
29 lines (26 loc) · 737 Bytes
/
index.html
File metadata and controls
29 lines (26 loc) · 737 Bytes
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Building Blocks app</title>
<script>
// Trun it to false to always install 'normal' package
var supportHIDPI = false;
var isFFOS = ("mozApps" in navigator && navigator.userAgent.search("Mobile") != -1);
if ( isFFOS ) {
var manifestUrl = 'http://buildingfirefoxos.github.io/Building-Blocks/package/package.manifest';
var req = navigator.mozApps.installPackage(manifestUrl);
req.onsuccess = function() {
console.log(this.result.origin);
};
req.onerror = function() {
console.log(this.error.name);
};
} else {
window.location.href = "app.html"
}
</script>
</head>
<body>
</body>
</html>