update index.html

This commit is contained in:
xiongdian.me 2023-05-12 16:02:26 +08:00
parent a4500ddc73
commit 32f486603f

View File

@ -61,11 +61,6 @@
</tr> </tr>
</thead> </thead>
<tbody align="center" id="mirror_list"> <tbody align="center" id="mirror_list">
<!-- <tr id="ubuntu"> </tr>
<tr id="ubuntu-releases"> </tr>
<tr id="CTAN"> </tr>
<tr id="docker-ce-linux-ubuntu"> </tr>
-->
</tbody> </tbody>
</table> </table>
<footer> <footer>
@ -75,36 +70,33 @@
</section> </section>
<script> <script>
var list = [ $.get("index", function(data){
"ubuntu", list = data.split('\n')
"ubuntu-releases", for (i in list) {
"CTAN", name=list[i]
"docker-ce/linux/ubuntu", if (name.length == 0) {
]; continue;
for (i in list) { }
(function (mirror) { $.get(name + ".log", function (data) {
var secure_name = mirror.replace(/\//g, "-");
$.get(secure_name + ".log", function (data) {
var data = data.split("\n"); var data = data.split("\n");
data[0] = data[0] =
"<a href='../" + data[0] + "'>" + data[0] + "</a>"; "<a href='../" + data[0] + "'>" + data[0] + "</a>";
for (i in data) { for (j in data) {
if (data[i] != "") { if (data[j] != "") {
data[i] = "<td>" + data[i] + "</td>"; data[j] = "<td>" + data[j] + "</td>";
} }
} }
//$("#" + secure_name).html(data);
$("#mirror_list").append( $("#mirror_list").append(
"<tr id='" + "<tr id='" +
secure_name + name +
"'>" + "'>" +
data.join("") + data.join("") +
"</tr>" "</tr>"
); );
console.log(data); console.log(data);
}); });
})(list[i]); }
} })
</script> </script>
<div hidden id="bottom-bar"> <div hidden id="bottom-bar">