-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreadSector.html
executable file
·45 lines (37 loc) · 1.1 KB
/
readSector.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="travGen.js"></script>
<script type="text/javascript" src="travGenUtils.js"></script>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous">
</script>
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<style>
#sector pre{
font-family: 'Roboto Mono', monospace;
font-size: 1vw;
}
</style>
</head>
<body>
<div id="sector"></div>
<script>
var s = new sector("Core");
$.get("testSector.txt", function(data){
//console.log("Data loaded: " + data);
// Convert data to text
var text = window.atob(data);
// Parse the text to a sector object
s.parseSector(text);
//console.log(s);
// Display formatted sector data to page
var div = document.getElementById("sector");
div.innerHTML = s.writeSectorHTML();
});
</script>
</body>
</html>