-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
50 lines (46 loc) · 1.34 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Am I using a private window?</title>
<style>
body{
padding-top: 2rem;
text-align: center;
}
span {
font-family: "Segoe UI Symbol";
}
@keyframes hi {
0% { transform: rotate(20deg); }
50% { transform: rotate(0deg); }
100% { transform: rotate(20deg); }
}
#result{
font-family: monospace;
position: relative;
font-size: 20px;
}
#result span{
transform-origin: center bottom;
position: absolute;
top: -2px;
animation: hi 1s linear 0s infinite;
}
</style>
<script type="text/javascript">
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.5.3/bluebird.min.js"><\/script><script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.2.5/polyfill.min.js"><\/script>');
</script>
<script src='PrivateWindowCheck.js'></script>
</head>
<body>
<div id="result">Loading...</div>
<script>
isPrivateWindow(function(is_private) {
document.getElementById('result').innerHTML = is_private === null ? 'cannot detect' : is_private ? 'private <span>👻</span>' : 'not private <span>🖐️</span>';
});
</script>
</body>