-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (54 loc) · 1.12 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1">
<title>Google Maps</title>
<style>
html,
body {
height: 100%;
margin: 0;
font: 14px sans-serif;
}
body {
display: flex;
align-items: center;
justify-content: center;
}
iframe {
position: absolute;
left: 0;
top: 0;
border: 0;
width: 100%;
height: 100%;
opacity: 0;
}
iframe.loaded {
opacity: 1;
}
h3 {
margin: 0;
text-align: center;
color: #666;
font-weight: lighter;
}
</style>
</head>
<body>
<h3>loading map ...</h3>
<script>
(function() {
var url = window.location.search.match(/url=([^&]+)/)[1];
if (!url) throw new Error('missing `url` query parameter');
var iframe = document.createElement('iframe');
iframe.src = decodeURIComponent(url);
iframe.onload = function() {
iframe.classList.add('loaded');
};
document.body.appendChild(iframe);
})();
</script>
</body>
</html>