-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
104 lines (104 loc) · 4.43 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
<html>
<head>
<title>Wakfu 1.85</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%221em%22 font-size=%2280%22>🔵</text></svg>">
<link rel="stylesheet" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/fixedheader/3.2.3/css/fixedHeader.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/fixedcolumns/4.1.0/css/fixedColumns.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/searchpanes/2.0.1/css/searchPanes.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.4.0/css/select.dataTables.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.12.0/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/fixedcolumns/4.1.0/js/dataTables.fixedColumns.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/select/1.4.0/js/dataTables.select.min.js"></script>
<script src="https://cdn.datatables.net/searchpanes/2.0.1/js/dataTables.searchPanes.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.12.1/sorting/enum.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.12.1/sorting/absolute.js"></script>
<script src="https://cdn.datatables.net/select/1.4.0/js/dataTables.select.min.js"></script>
</head>
<body>
🌐
<select id="langSelect1" onchange="langChange()" style ="border-radius: 8px">
<option value="tw">繁體中文</option>
<option value="cn">简体中文</option>
<option value="en">English</option>
<option value="es">Español</option>
<option value="pt">Português</option>
<option value="fr">Français</option>
</select>
&
<select id="langSelect2" onchange="langChange()" style ="border-radius: 8px">
<option value="none">--</option>
<option value="tw">繁體中文</option>
<option value="cn">简体中文</option>
<option value="en">English</option>
<option value="es">Español</option>
<option value="pt">Português</option>
<option value="fr">Français</option>
</select>
<span id="btnArray" style="margin-left: 20px">
<button class="btnTop" onclick="tableChange('equip.js')">⚔️🛡️🏹</button>
<button class="btnTop" onclick="tableChange('items.js')">📋📝📕</button>
</span>
<table id="tableArray" class="display" width="100%" style="white-space: nowrap; font-size: 14px"></table>
<style>
.btnTop {
border-radius: 16px;
border: 1px solid;
cursor: pointer;
margin-left: 5px;
}
.btnTop:hover {
background-color: grey;
}
button.dt-button,
div.dt-button-collection,
div.dt-button-collection.fixed.columns {
border-radius: 12px;
}
div.dt-button-collection button.dt-button,
div.dt-button-collection button.dt-button:first-child,
div.dt-button-collection button.dt-button:last-child,
div.dt-button-collection.fixed button.dt-button:first-child,
div.dt-button-collection.fixed button.dt-button:last-child {
border-radius: 16px;
}
button.result-alter {
margin: -1px;
}
</style>
<script>
function langChange() {
localStorage.setItem('lang', document.getElementById('langSelect1').value);
localStorage.setItem('lang2', document.getElementById('langSelect2').value);
location.reload();
}
const langList = ['tw', 'cn', 'en', 'es', 'pt', 'fr'];
let lang = localStorage.getItem('lang');
let lang2 = localStorage.getItem('lang2');
let params = new URL(window.location.href).searchParams;
if (params.has('ln') && !langList.includes(lang))
lang = params.get('ln');
if (!langList.includes(lang))
lang = 'tw';
if (!langList.includes(lang2) || lang2 == lang)
lang2 = 'none';
document.getElementById('langSelect1').value = lang;
document.getElementById('langSelect2').value = lang2;
if (lang != 'tw')
document.getElementById('btnArray').style.display = 'none';
function tableChange(t) {
localStorage.setItem('table', t);
location.reload();
}
if (localStorage.getItem('table') == null || lang != 'tw')
localStorage.setItem('table', 'equip.js');
let s = document.createElement('script');
s.src = localStorage.getItem('table');
document.getElementById("tableArray").appendChild(s);
localStorage.removeItem('list');
</script>
</body>
</html>