forked from ythri/tcresearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (92 loc) · 5.92 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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title data-i18n="title">Thaumcraft 4 Research Helper (Multi-Language)</title>
<script type="text/javascript" src="buckets-minified.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="i18next/i18next.min.js"></script>
<script type="text/javascript">
//language
var language = ['en', 'zh-TW'];
var language_name = ['English', '繁體中文'];
//i18n option
var option = {
getAsync: false,
fallbackLng: 'en',
//lngWhitelist: language,
ns: {
namespaces: ['translation', 'aspect'],
defaultNs: 'translation'
},
fallbackToDefaultNS: true,
debug: true
};
//i18n init (for select2.min.js)
i18n.init(option,function(t) { });
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="select2.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="select2.css">
<script type="text/javascript" src="translation_dictionary.js"></script>
<script type="text/javascript" src="version_dictionary.js"></script>
<script type="text/javascript" src="addon_dictionary.js"></script>
<script type="text/javascript" src="tcresearch.js"></script>
<link rel="stylesheet" href="tcresearch.css">
<style type="text/css">
.select2-container .select2-choice {
height: 44px;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
//i18n init again (for this document)
$(document).i18n();
//language select menu
var sel = document.getElementById('languageList');
for(var i = 0; i < language.length; i++) {
var opt = document.createElement('option');
opt.innerHTML = language_name[i];
opt.value = language[i];
sel.appendChild(opt);
}
$("select#languageList").val(i18n.lng());
$("select#languageList").change(function(){
window.location.href = window.location.pathname + "?setLng="+$(this).val();
});
});
</script>
</head>
<body>
<h2 data-i18n="title">Thaumcraft 4 Research Helper (Multi-Language)</h2>
<div id="combination_box"><div id="left"></div><span class="operator">+</span><div id="right"></div><span class="operator">=</span><div id="equals"></div></div>
<table>
<tr>
<td data-i18n="language" width="160px">Language: </td>
<td>
<select id="languageList">
</select>
</td>
</tr>
<tr>
<td data-i18n="version">Version: </td>
<td>
<select id="version">
</select>
</td>
</tr>
<tr><td data-i18n="from">From: </td><td><input type=hidden id="fromSel"></input></td></tr>
<tr><td data-i18n="to">To: </td><td><input type=hidden id="toSel"></input></td></tr>
<tr><td data-i18n="min_steps">Min. Steps: </td><td><input id="spinner" name="value" value="1" style="width:140px" /></td></tr>
<tr><td></td><td><input id="find_connection" type="button" value="Find Connection" data-i18n="[value]find_connection" /><input id="close_results" type="button" value="Close all results" data-i18n="[value]close_results" /></td></tr>
<tr><td data-i18n="addons">Addons: </td><td id="addons"></td></tr>
<tr><td data-i18n="available_spects">Available Aspects:</td><td><input type="button" id="sel_all" value="Select All Aspects" data-i18n="[value]sel_all"><input type="button" id="desel_all" value="Deselect All Aspects" data-i18n="[value]desel_all"><ul id="avail" class="aspectlist"></ul></td></tr>
</table>
<h3 style="margin-top:100px" data-i18n="help">Help</h3>
<p data-i18n="[html]help_p1">This script helps you with your Thaumcraft 4.1 research. If you have a research note with two aspects that you don't know how to connect, simply choose them in the dropdown list above (<strong>From:</strong> and <strong>To:</strong>). Additionally, choose the minimum number of steps between those two aspects. If in your research note, the two aspects have two blank spaces between them, choose the value 2 for <strong>Min. Steps</strong>. Then click <strong>Find Connection</strong> and the script will search for the shortest path (well, with at least the minimum length) that connects the two aspects. Note that sometimes the length of any path is longer then the given minimum, but this should not be a problem for your research note.</p>
<p data-i18n="[html]help_p2">If you are unhappy with the path you got, because you do not have access to those aspects yet or they are quite rare, simply disable those aspects from <strong>Available Aspects:</strong>. The script will then try to find paths without these. Note that this may cause the path to grow longer. If too many aspects are disabled and there are no paths left without any of those, the script will try to find the shortest path using the minimal number of disabled aspects.</p>
<p data-i18n="[html]author">The original author of this script is <a href="https://github.com/ythri" style="color:#55a;" target="_blank">ythri</a>. This multi-language version is maintained by <a href="https://github.com/jyhsu2000" style="color:#55a;" target="_blank">jyhsu2000</a>.<br />If you have any questions or suggestions of this version, or you want to provide other language pack. Please use <a href="https://github.com/jyhsu2000/tcresearch/issues" style="color:#55a;" target="_blank">Issues</a> on GitHub</p>
<p style="size:small;color:#666;margin-top:50px;" data-i18n="[html]copyright">This work is licensed under a <a href="http://creativecommons.org/licenses/by/4.0/" style="color:#55a;" target="_blank">Creative Commons Attribution 4.0 License</a>. Sources of original version can be found in the <a href="https://github.com/ythri/tcresearch/tree/gh-pages" style="color:#55a;" target="_blank">github repository</a>. Sources of multi-language version can be found in the <a href="https://github.com/jyhsu2000/tcresearch/tree/gh-pages" style="color:#55a;" target="_blank">github repository</a>.</p>
</body>
</html>