Commit af84cb8a by Markus Koschany

Update index.html and add support for HD videos.

parent 527b1994
......@@ -19,6 +19,15 @@ Mediatheken des deutschsprachigen Fernsehens" />
<script type="text/javascript" charset="utf-8" src="js/moment.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/datetime-moment.js"></script>
<script type="text/javascript" class="init">
function createUrlFromBase(baseUrl, newUrl) {
const newSplit = newUrl.split('|');
if (newSplit.length == 2) {
return baseUrl.substr(0, newSplit[0]) + newSplit[1];
}
return '';
}
$(document).ready( function () {
$.fn.dataTable.moment( 'DD.MM.YYYY' );
......@@ -42,6 +51,18 @@ $(document).ready( function () {
"render": function (data, type, row, meta) {
return '<a href="'+data+'" target="_blank">'+row[0]+'</a>';
}
},
{
"targets": 8,
"data": 6,
"render": function (data, type, row, meta) {
if (row[8] != "") {
return '<a href="'+createUrlFromBase(data, row[8])+'" target="_blank">HD</a>';
}
else {
return '';
}
}
}
],
"ajax": {
......@@ -58,7 +79,8 @@ $(document).ready( function () {
null,
{ "visible": false },
{ "visible": false },
{ "visible": false }
{ "visible": false },
null
]
} );
} );
......@@ -83,6 +105,7 @@ $(document).ready( function () {
<th>Beschreibung</th>
<th>URL</th>
<th>Webseite</th>
<th>HD</th>
</tr>
</thead>
<tfoot>
......@@ -95,6 +118,7 @@ $(document).ready( function () {
<th>Beschreibung</th>
<th>URL</th>
<th>Webseite</th>
<th>HD</th>
</tr>
</tfoot>
</table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment