-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathcompatibility.html
More file actions
executable file
·143 lines (127 loc) · 5.59 KB
/
Copy pathcompatibility.html
File metadata and controls
executable file
·143 lines (127 loc) · 5.59 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7">
<![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8">
<![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<title>ProtonMail - Secure email based in Switzerland</title><meta name="description" content="Secure email with absolutely no compromises. Get your free encrypted email account today."> <meta property="og:image" content="https://protonmail.ch/img/facebook_logo.jpg"/>
<meta property="og:title" content="Encrypted email, based in Switzerland."/>
<meta property="og:url" content="https://protonmail.ch"/>
<meta property="og:site_name" content="ProtonMail"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link type="text/css" rel="stylesheet" href="/theme.css"> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<meta name="mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.json">
<link rel="icon" sizes="192x192" href="/img/android/launcher-icon-4x.png">
</head>
<body id="page-compatibility" class="external">
include "pages/_nav.html"
<div class="container narrow">
<div class="container panel round">
<div id="compatibility" class="text-center">
<h2><span class="fa faded fa-tasks"></span>Compatibility</h2>
<p>The following features are required to run ProtonMail:</p>
<div id="safari-upgrade" style="display:none" class="alert alert-danger">
<p>ProtonMail requires Safari version 6.1 or higher. Please update Safari.</p>
</div>
<div id="compat-good" style="display:none" class="alert alert-success">
<p>You have all the requirements to use ProtonMail on this device / in this web browser.</p>
</div>
<div id="compat-bad" style="display:none" class="alert alert-danger">
<p>Your browser doesn't meet the minimum requirements to use ProtonMail. <a href="http://outdatedbrowser.com/en" target="_blank">Upgrade your browser</a>.</p>
</div>
<div id="ss_err" style="display:none" class="alert alert-danger">
<p>ProtonMail requires sessionStorage to be enabled.<br><a href="https://blog.protonmail.ch/enabling-storage-session-firefox/">Learn more</a>.</p>
</div>
<div class="browser_list text-center">
<table class="pure-table pure-table-horizontal pure-table-bordered">
<tbody>
<tr>
<th><a target="_blank" href="http://www.w3schools.com/html/html5_webstorage.asp">sessionStorage</a></th>
<td><span id="compat-ss" class="fa fa-2x"></span></td>
</tr>
<tr>
<th><a target="_blank" href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator">PRNG</a></th>
<td><span id="compat-prng" class="fa fa-2x"></span></td>
</tr>
</tbody>
</table>
</div><!--/.browser_list-->
</div><!--/#compatibility-->
</div><!--/.panel-->
</div><!--/.narrow middlepanel-->
<script type="text/javascript" src="/modernizr.js"></script>
<script type="text/javascript" src="/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
function float2int (value) {
return value | 0;
}
function get_browser(){
var N=navigator.appName, ua=navigator.userAgent, tem;
var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
if(M && (tem= ua.match(/version\/([\.\d]+)/i))!== null) M[2]= tem[1];
M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?'];
return M[0];
}
function get_browser_version(){
var N=navigator.appName, ua=navigator.userAgent, tem;
var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
if(M && (tem= ua.match(/version\/([\.\d]+)/i))!== null) M[2]= tem[1];
M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?'];
return M[1];
}
function is_good_prng_available() {
if (typeof window !== 'undefined' && window.crypto && window.crypto.getRandomValues) {
return true;
} else if (typeof window !== 'undefined' && typeof window.msCrypto === 'object' && typeof window.msCrypto.getRandomValues === 'function') {
return true;
} else {
return false;
}
}
$( function() {
var compatible = true;
if (!Modernizr.sessionstorage) {
$('#ss_err').show();
$('#compat-ss').addClass('fa-times-circle');
compatible = false;
$('.browser_list tr').eq(0).addClass('bad');
}
else {
$('#compat-ss').addClass('fa-check-circle');
}
if(!is_good_prng_available()) {
$('#compat-prng').addClass('fa-times-circle');
compatible = false;
$('.browser_list tr').eq(1).addClass('bad');
}
else {
$('#compat-prng').addClass('fa-check-circle');
}
if (get_browser()==='Safari') {
console.log(get_browser_version());
if (float2int(get_browser_version())<6) {
compatible = false;
$('#safari-upgrade').slideDown();
}
}
if (compatible) {
$('#compat-good').slideDown();
}
else {
$('#compat-bad, .browsers').slideDown();
}
});
</script>
include "pages/_footer.html"