-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.html
More file actions
63 lines (62 loc) · 2.25 KB
/
home.html
File metadata and controls
63 lines (62 loc) · 2.25 KB
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
<html>
<head>
<meta name="description" content="This is the home for protractor Firefox OS app">
</head>
<body>
<img id="home-protractor" src="app/img/protractor_plain.svg" />
<div id="install-button">Install</div>
</body>
<style type="text/css">
#install-button {
position: fixed;
left: 100%;
top: 0;
width: 6em;
margin: 1em 0 0 -14em;
text-decoration: none;
font: bold 14px/14px HelveticaNeue, Arial;
border: 1px solid #dedede;
padding: 1em 1em 1em 4em;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background: #fecc5f;
background: -webkit-gradient(linear, left top, left bottom, from(#feda71), to(#febb4a)); /* WebKit */
background: -moz-linear-gradient(top, #feda71, #febb4a);
border-color: #f5b74e #e5a73e #d6982f;
color: #996633;
text-shadow: 0 1px 0 #fedd9b;
-webkit-box-shadow: 0 1px 1px #d3d3d3, inset 0 1px 0 #fee395;
-moz-box-shadow: 0 1px 1px #d3d3d3, inset 0 1px 0 #fee395;
box-shadow: 0 1px 1px #d3d3d3, inset 0 1px 0 #fee395;
}
#install-button:hover{
background: #fecb5e;
background: -webkit-gradient(linear, left top, left bottom, from(#fec354), to(#fecd61)); /* WebKit */
background: -moz-linear-gradient(top, #fec354, #fecd61);
border-color: #d29a3a #cc9436 #c89133;
text-shadow: 0 1px 0 #fee1a0;
-webkit-box-shadow: 0 1px 1px #d4d4d4, inset 0 1px 0 #fed17e;
-moz-box-shadow: 0 1px 1px #d4d4d4, inset 0 1px 0 #fed17e;
box-shadow: 0 1px 1px #d4d4d4, inset 0 1px 0 #fed17e;
}
</style>
<script type="text/javascript">
// Install app
(function(){
function install(ev) {
ev.preventDefault();
var manifest_url = 'http://' + window.location.host + '/protractor/app/manifest.webapp';
var myapp = navigator.mozApps.install(manifest_url);
myapp.onsuccess = function(data) {
button.innerHTML = 'installed';
};
myapp.onerror = function() {
console.log('Install failed, error: ' + this.error.name);
};
};
var button = document.getElementById('install-button');
button.addEventListener('click', install, false);
})();
</script>
</html>