-
Notifications
You must be signed in to change notification settings - Fork 0
/
down.html
108 lines (99 loc) · 3.89 KB
/
down.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
105
106
107
108
<!doctype html>
<html lang="en">
<head>
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-139150451-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-139150451-1');
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="MalluOS">
<link rel='shortcut icon' type='image/x-icon' href='assets/img/favicon.png' />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.3.1/darkly/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">
<title>MalluOS</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-secondary">
<a class="navbar-brand" href="index.html">MalluOS</a>
</nav>
<main role="main" class="container mt-3 bg-secondary">
<div class="row">
<div class="col-sm-12">
<h4 class="rom-title"></h4>
</div>
</div>
<div class="row mt-3">
<div class="col-sm-12">
<table class="table table-striped" id="romlist" style="width: 100%;">
<thead>
<tr>
<th>Filename</th>
<th>Size</th>
<th>Upload Date</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</main>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>
<script src="//cdn.datatables.net/plug-ins/1.10.19/sorting/datetime-moment.js"></script>
<script type="text/javascript">
$.urlParam = function (name) {
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
if (results == null) {
return null;
}
return decodeURI(results[1]) || 0;
}
function loadRom(device, ver) {
var url = 'data/' + ver + '/' + device + '.json?'+Date.now();
$.getJSON(url, function (data) {
$('.rom-title').html(data.device);
});
}
$(document).ready(function () {
var device = $.urlParam("device");
var ver = $.urlParam("ver");
loadRom(device, ver);
// Sort Date/Time using Moment.js
$.fn.dataTable.moment( 'MMM DD, YYYY | HH:mmA' );
$('#romlist').DataTable({
"searching": false,
"ajax": 'data/' + ver + '/' + device + '.json?'+Date.now(),
"order": [[0, "desc"]],
"columns": [
{"data": "filename"},
{"data": "filesize"},
{"data": "date"},
],
"columnDefs": [
{
"render": function (data, type, row) {
return '<a href="' + row.url + '">' + data + '</a>';
},
"targets": 0
},
]
});
});
</script>
</body>
</html>