-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (56 loc) · 2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Front Range Mutual Aid</title>
<meta property="og:type" content="business.business">
<meta property="og:title" content="Front Range Mutual Aid Network">
<meta property="og:url" content="https://frman.org">
<meta property="og:image" content="https://frman.org/graph_image.jpg">
<style>
html { box-sizing: border-box }
*, *:before, *:after { box-sizing: inherit }
html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, dl,
dt, dd, blockquote, address { margin: 0; padding: 0 }
body#iframe { overflow: hidden; }
.doc {
width: 100vw;
height: 100vh;
border: 0;
}
.wrapper {
padding: 15px;
max-width: 800px;
margin: 0 auto;
}
#header,
#footer { display: none; }
</style>
</head>
<body>
<div id="doc">
Loading...
</div>
<script>
var html = document.createElement('html');
var iframe = '<iframe class="doc" src="https://docs.google.com/document/d/e/2PACX-1vSe3N73upSIkkevDabJA7-1tkgcg53vSrC4zjUIVcBXDmdEJp2CJSLCcsCMwYldun5YJBwMRa_Q7rRP/pub?embedded=false"></iframe>';
var url = 'https://docs.google.com/document/d/e/2PACX-1vSe3N73upSIkkevDabJA7-1tkgcg53vSrC4zjUIVcBXDmdEJp2CJSLCcsCMwYldun5YJBwMRa_Q7rRP/pub';
var d = document.getElementById('doc');
// CORS request
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.onload = function () {
// add response to node
html.innerHTML = xhr.responseText;
d.innerHTML = html.getElementsByTagName('div')["contents"].innerHTML;
d.classList.add("wrapper");
};
xhr.onerror = function () {
document.body.id = 'iframe';
d.innerHTML = iframe;
}
xhr.send();
</script>
</body>
</html>