-
Notifications
You must be signed in to change notification settings - Fork 0
/
format.html
97 lines (82 loc) · 2.28 KB
/
format.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
<HTML>
<head>
<title>format planet lists</title>
<meta name="description" lang="de" content="A tool to make clean planet lists.">
<meta name="keywords" content="imperial conflict,recent,reports,summary,php,MMOG,massive,multiplayer,online,game">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link REL=STYLESHEET HREF="ic.css" TYPE="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
function updateResults() {
//82,98:10
text = document.getElementById('planetList').value;
standardPlanetPatter = /(\d+,\d+:\d+)/gm;
matches = []
matches = text.match(standardPlanetPatter);
out = ''
if (matches !== null) {
for (const match of matches) {
out = out + " " + match + "\n";
}
}
newsPlanetPattern = /planet (\d+) in the (\d+),(\d+) system/gm;
matches = []
matches = text.matchAll(newsPlanetPattern);
if (matches !== null) {
for (const match of matches) {
out = `${out}${match[2]},${match[3]}:${match[1]}\n`
}
}
lostPlanetPattern = /Our planet (\d+) at x:(\d+), y:(\d+)/gm;
matches = []
matches = text.matchAll(lostPlanetPattern);
if (matches !== null) {
for (const match of matches) {
out = `${out}${match[2]},${match[3]}:${match[1]}\n`
}
}
document.getElementById('planetList').value = out;
}
</script>
</head>
<BODY>
<h3>silenz copy - online tools for <a href="http://www.imperialconflict.com/">Imperial Conflict</a></h3>
<hr>
<hr>
<a href="index.html">Family News Analyzer</a> -
<a href="reports.html">Recent Reports Summarizer</a> -
<a href="format.html">Format Planet Lists</a> -
<hr>
<h3>Format Planet Lists</h3>
<h4>Formats planet lists so they are nice and clean.</h4>
Paste any planet lists and click format and it should make a clean list!
<br>
<P>
<TEXTAREA id="planetList" name="planetList" cols=50 rows=5>enter planet list here</TEXTAREA>
<BR>
</P>
<button onclick="updateResults()">format</button>
<button onclick="copyToClipboard('planetList')">Copy</button>
<hr>
<div align=center>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<script src="app.js" type="text/javascript"></script>
</BODY>
</HTML>