-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
50 lines (40 loc) · 962 Bytes
/
index.html
File metadata and controls
50 lines (40 loc) · 962 Bytes
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>
<head>
<title>Maze Generation</title>
<style>
body {
margin: 0px;
padding: 0px;
background: black;
overflow: auto;
text-align: center;
}
iframe {
border: 0px;
display: inline-block;
margin: 0px;
}
</style>
</head>
<body>
<script>
var windows = ["mazeGenerator", "mazeGeneratorDemo", "rainbowMazeGenerator", "hexMazeGenerator", "rainbowHexMazeGenerator"];
var iframes = [];
for (var n = 0; n < windows.length; n++) {
iframes[n] = document.createElement("iframe");
iframes[n].src = "./" + windows[n] + ".html";
document.body.appendChild(iframes[n]);
}
var resize;
window.addEventListener("resize", resize = function() {
for (var n = 0; n < iframes.length; n++) {
iframes[n].width = ~~Math.min(window.innerWidth / 2, window.innerHeight / 2);
iframes[n].height = iframes[n].width;
}
});
resize();
//setTimeout(resize, 1000);
</script>
</body>
</html>