-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
97 lines (84 loc) · 2.16 KB
/
index.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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1">
<title>Get Magnet</title>
<style>
@import url(https://fonts.googleapis.com/css?family=Fira+Sans:400,300italic,400italic,300);
html,
body {
margin: 0;
padding: 0;
height: 100%;
font: 16px 'Fira Sans';
color: #444;
}
body {
display: flex;
align-items: center;
justify-content: center;
}
.button {
display: block;
border: 0;
padding: 13px 14px;
border-radius: 4px;
color: #fff;
font: inherit;
font-style: italic;
font-weight: 400;
font-size: 27px;
text-align: center;
line-height: 1;
cursor: pointer;
text-decoration: none;
margin: 20px;
background: #49A3FF;
box-shadow:
0px 1px 3px 0px rgba(0,0,0,0.21),
0px 2px 10px 0px rgba(0,0,0,0.13);
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.button:active {
opacity: 0.7;
box-shadow: none;
transform: translateY(1px);
}
</style>
</head>
<body>
<script>
(function() {
var render = {
android: function() {
var a = document.createElement('a');
a.href = 'https://github.com/mozilla-magnet/magnet-client/releases/download/nightly/app-release.apk';
a.textContent = 'Download Magnet';
a.className = 'button';
return a;
},
ios: function() {
window.location = 'https://docs.google.com/a/mozilla.com/forms/d/1SP_W5warjpvvJahLsEZ5-QdMLJGSiy0ceGQsqRf5JPM/viewform';
},
unsupported: function() {
var el = document.createElement('h3');
el.textContent = 'Your device is not supported';
return el;
}
};
function platform() {
var ua = navigator.userAgent;
if (/Android/.test(ua)) return 'android';
else if (/iPhone/.test(ua)) return 'ios';
else return 'unsupported';
}
var el = render[platform()]();
if (el) document.body.appendChild(el);
})();
</script>
</body>
</html>