-
Notifications
You must be signed in to change notification settings - Fork 1
/
terminal.html
75 lines (70 loc) · 2.59 KB
/
terminal.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
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://bootswatch.com/4/darkly/bootstrap.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?amily=Roboto+Mono&display=swap" rel="stylesheet">
<title>DOSArchive</title>
<script src="js/js-dos.js"></script>
</head>
<style>
#title {
color: white;
flex: 1;
text-align: center;
font-family: 'Roboto Mono', monospace;
flex-wrap: wrap;
}
#jsdos {
width: 960px;
height: 600px;
}
</style>
<body style="background-color: black;">
<h1 id="title">DOSArchive Terminal</h1>
<p id="title">Interact and Browse Yasser Awad's DOS work using an emulated DOS terminal in your browser!</p>
<canvas id="jsdos"></canvas>
<div class="container-fluid text-center pt-3">
<button class="btn btn-lg btn-primary mx-2" onclick="ci.fullscreen()">Fullscreen</button>
<button class="btn btn-lg btn-warning mx-2" onclick="resetCache()">Reset Cache</button>
<button class="btn btn-lg btn-success mx-2" onclick="window.location.reload()">Run Again</button>
<button class="btn btn-lg btn-light mx-2" onclick="window.history.back()">Go Back</button>
</div>
<script>
function resetCache() {
window.indexedDB.databases().then(dbs => {
dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) });
});
alert('Please refresh to finish clearing the cache.');
}
Dos(document.getElementById("jsdos"), {
wdosboxUrl: "js/wdosbox.js",
cycles: 1000,
autolock: false,
}).ready(function (fs, main) {
fs.extractAll([
{ url: "dist/RUN.zip", mountPoint: "/" },
{ url: "dist/SCREEN.zip", mountPoint: "/ARCHIVE/SCREEN" },
{ url: "dist/SUN.zip", mountPoint: "/ARCHIVE/SUN" },
{ url: "dist/ARABART.zip", mountPoint: "/ARCHIVE/ARABART" },
{ url: "dist/ARABIC.zip", mountPoint: "/ARCHIVE/ARABIC" },
{ url: "dist/EDIT.zip", mountPoint: "/ARCHIVE/EDIT" },
{ url: "dist/FORM_X.zip", mountPoint: "/ARCHIVE/FORM_X" },
{ url: "dist/KVC.zip", mountPoint: "/ARCHIVE/KVC" },
{ url: "dist/NAMES.zip", mountPoint: "/ARCHIVE/NAMES" },
{ url: "dist/PESM.zip", mountPoint: "/ARCHIVE/PESM" },
{ url: "dist/PORTSAID.zip", mountPoint: "/ARCHIVE/PORTSAID" },
{ url: "dist/DIGI_T.zip", mountPoint: "/ARCHIVE/DIGI_T" },
{ url: "dist/TAHER.zip", mountPoint: "/ARCHIVE/TAHER" },
{ url: "dist/WINKEY.zip", mountPoint: "/ARCHIVE/WINKEY" }
]).then(function () {
main(["-c", "RUN.BAT"]).then(function (ci) {
window.ci = ci;
});
});
});
</script>
</body>
</html>