forked from ThePix/QuestJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (62 loc) · 2.15 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
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Interactive Fiction Using QuestJS</title>
<meta http-equiv="Content-Security-Policy" content="
default-src 'self';
style-src 'unsafe-inline' 'self' https://fonts.googleapis.com https://cdnjs.cloudflare.com;
font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com;
script-src 'unsafe-inline' 'self';
img-src 'self';"
>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />
<script>
let folder = 'game/'
let loaded = false
if (window.location.search) folder = 'game-' + window.location.search.substring(1) + '/'
const qeditor = false
const resourcesFolder = ''
</script>
<script src="lib/_util.js"></script>
<script src="lib/_settings.js"></script>
<script>
const myScript = document.createElement("script")
myScript.setAttribute("src", folder + '/settings.js')
myScript.onload = function() {
settings.writeScript(folder, "", "")
}
myScript.onerror = function() {
console.log("Failed to load file \"" + folder + "/settings.js\".")
console.log("Check the file and folder actually exist.")
console.log("This is probably because the folder \"" + folder + "\" does not exist, perhaps because it is wrongly specified in the address.")
}
document.head.appendChild(myScript)
</script>
</head>
<body>
<h1 id="loading">Story loading, please wait...</h1>
<div id="main">
<div id="inner">
<div id="output"></div>
<div id="input"></div>
</div>
</div>
<dialog id="dialog">
<form method="dialog">
<h4 id="dialog-title"></h4>
<hr/>
<div id="dialog-content"></div>
<div id="dialog-footer" style="text-align:right">
<hr/>
<button id="dialog-button" value="default">Confirm</button>
</div>
</form>
</dialog>
<div id="quest-map"></div>
<div id="quest-image"></div>
<form style="display:none" id="fileDialogForm">
<input type="file" id="fileDialog" accept=".q6save"/>
</form>
</body>
</html>