-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcyoa.html
35 lines (32 loc) · 1.02 KB
/
cyoa.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
<!DOCTYPE html>
<html>
<head>
<title>CYOA</title>
<script src="script.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<button onclick="window.location.href='/CYOA/index.html'" id="home_button">Home</button>
<div id="file_field"></div>
<div id="title">Loading</div>
<div id="text">
Just wait a bit, if nothing loads after 5 seconds then you have a problem.
Try reloading and waiting again.
If still nothing appears, make sure you are not using private browsing or anything that changes cookies.
</div>
<br />
<div id="choices"></div>
</body>
<script>
// GENERATE THE STORY in an iframe
var file_field = document.getElementById("file_field");
var iframe = document.createElement("iframe");
iframe.id = "file";
iframe.src = "adventures/" + get_cookie("file");
iframe.style.display = "none";
file_field.appendChild(iframe);
window.addEventListener('load', function () {
generate_html();
})
</script>
</html>