-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
136 lines (108 loc) · 4.79 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<html>
<head>
<script src="script/lib/filesaver.js"></script>
<script src="script/filehandlers/detect.js"></script>
<script src="script/filehandlers/iff.js"></script>
<script src="script/filehandlers/mod.js"></script>
<script src="script/filehandlers/amos.js"></script>
<script src="script/filehandlers/icon.js"></script>
<script src="script/file.js"></script>
<script src="script/adf.js"></script>
<script src="script/main.js"></script>
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div id="container">
<div id="dropzone">
<div class="selector">
or choose a test disk:
<select id="diskurl" onchange="AdfViewer.load()">
<option value="">---</option>
<option value="disks/dkm.adf">dkm.adf</option>
<option value="disks/images.adf">images.adf</option>
<option value="disks/spudmine7.adf">spudmine7.adf</option>
<option value="disks/DeluxePaintIII.adf">DeluxePaintIII.adf</option>
<option value="disks/DeluxePaintIVdata.adf">DeluxePaint IV Images.adf</option>
<option value="disks/VogueMusicDisk.adf">VogueMusicDisk.adf</option>
</select>
</div>
Drop your .adf files here
</div>
<div id="feedback">
</div>
<div id="filemanager">
<div id="modaldialog">
<div class="dialog">
<h1 id="dialogtitle">Title</h1>
<div class="content">
<div id="dialogcontent"></div>
<div class="input">
<input type="text" id="dialoginput" class="inputbox">
</div>
</div>
<div class="buttons">
<div class="btn ok" onclick="AdfViewer.dialog(true)">OK</div>
<div class="btn cancel" onclick="AdfViewer.dialog(false)">Cancel</div>
</div>
</div>
</div>
<div class="caption amiga"><span class="diskmenu"><span id="diskspace"></span> <i class="fa fa-download" aria-hidden="true" onclick="adf.download()" title="Download disk"></i> </span> ADF file</div>
<div class="panel" id="folder">
<div class="diskheader">
<div class="button right" onclick="AdfViewer.showSector(0)">Read Raw sectors</div>
<div class="button" onclick="AdfViewer.showRoot()">Disk:</div>
<div id="disklabel" class="itemlabel"> </div>
</div>
<div id="fileinfo">
</div>
<div id="list">
</div>
<div class="clear"></div>
</div>
<div class="panel" id="file">
<div class="diskheader">
<div class="button right" onclick="AdfViewer.showFolder()">Back</div>
<div class="button" onclick="AdfViewer.download()">File:</div>
<div id="filelabel" class="itemlabel"> </div>
</div>
<textarea id="hex">
</textarea>
<textarea id="ascii">
</textarea>
<canvas id="canvas" width="800" height="600"></canvas>
<div class="clear"></div>
</div>
<div class="panel" id="raw">
<div class="diskheader">
<div class="button right" onclick="AdfViewer.showFolder()">Back</div>
<span class="inline">Sector:</span>
<div class="button inline" onclick="AdfViewer.prevSector()"><</div>
<input type="text" id="sector" value="0" onchange="AdfViewer.onSectorUpdate()">
<div class="button inline" onclick="AdfViewer.nextSector()">></div>
<span class="inline" id="sectorinfo"></span>
</div>
<textarea id="sectorhex">
</textarea>
<textarea id="sectorascii">
</textarea>
<div class="clear"></div>
</div>
</div>
<div class="footer">Read and extract files from Amiga Disk Format (*.adf files) in plain javascript - 2017 by Steffest - <a href="https://github.com/steffest/ADF-reader">source on Github</a></div>
</div>
<script>
var target = document.getElementById("dropzone");
if (target){
target.addEventListener("dragenter", AdfViewer.handleDragEnter, false);
target.addEventListener("dragover", AdfViewer.handleDragOver, false);
target.addEventListener("drop", AdfViewer.handleDrop, false);
}
var initialFile = getUrlParameter("file");
if (initialFile){
initialFile = decodeURIComponent(initialFile);
AdfViewer.load(initialFile);
}
</script>
</body>
</html>