2017-10-07 05:05:58 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Loading</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<style type="text/css">
|
|
|
|
html, body {
|
|
|
|
font-family: sans-serif;
|
2017-10-15 05:49:46 +00:00
|
|
|
margin:0;
|
|
|
|
width:100%;
|
|
|
|
height:100%;
|
|
|
|
}
|
|
|
|
#padder {
|
|
|
|
height:100%;
|
|
|
|
position:relative;
|
2017-10-07 05:05:58 +00:00
|
|
|
}
|
|
|
|
#surrogate-area {
|
2017-10-15 05:49:46 +00:00
|
|
|
position:absolute;
|
|
|
|
top:10px;
|
|
|
|
bottom:10px;
|
|
|
|
left:10px;
|
|
|
|
right:10px;
|
2017-10-08 01:11:16 +00:00
|
|
|
}
|
2017-10-15 05:54:14 +00:00
|
|
|
button.again {
|
|
|
|
margin-top:2em;
|
|
|
|
}
|
2017-10-08 01:11:16 +00:00
|
|
|
/* hide close button */
|
|
|
|
.contented-close {
|
|
|
|
display: none;
|
2017-10-07 05:05:58 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2017-10-15 05:49:46 +00:00
|
|
|
<div id="padder">
|
|
|
|
<div id="surrogate-area">
|
|
|
|
Loading...
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-10-07 05:05:58 +00:00
|
|
|
|
|
|
|
<script type="text/javascript" src="/jquery-1.12.4.min.js"></script>
|
|
|
|
<script type="text/javascript" src="/sdk.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
"use strict";
|
2017-10-08 03:27:04 +00:00
|
|
|
|
|
|
|
// Handle errors
|
|
|
|
window.addEventListener('error', function(message) {
|
|
|
|
alert(message);
|
|
|
|
window.location.href = window.location.href;
|
|
|
|
})
|
|
|
|
|
2017-10-08 02:16:57 +00:00
|
|
|
// Set page title
|
|
|
|
$.get("/about", function(ret) {
|
|
|
|
$("title").text(ret.AppTitle);
|
|
|
|
});
|
|
|
|
|
|
|
|
// Load upload widget
|
2017-10-08 01:49:00 +00:00
|
|
|
contented.init("#surrogate-area", function(items) {
|
2017-10-08 02:22:41 +00:00
|
|
|
|
|
|
|
var $table = $("<table>");
|
|
|
|
for (var i = 0; i < items.length; ++i) {
|
|
|
|
$table.append($("<tr>").append([
|
2017-11-18 00:32:54 +00:00
|
|
|
$("<td>").append($("<img>").attr('src', contented.getThumbnailURL(contented.thumbnail.small_square, items[i]))),
|
2017-10-08 02:22:41 +00:00
|
|
|
$("<td>").text(items[i]),
|
2017-10-15 05:50:55 +00:00
|
|
|
$("<td>").html("<a target='_blank' href='" + contented.getDownloadURL(items[i]) + "'>get</a>"),
|
|
|
|
$("<td>").html("<a target='_blank' href='" + contented.getInfoJSONURL(items[i]) + "'>info</a>"),
|
2017-10-08 02:22:41 +00:00
|
|
|
]))
|
|
|
|
}
|
2017-10-15 05:54:14 +00:00
|
|
|
$("#surrogate-area").html([
|
|
|
|
$table,
|
|
|
|
$("<button>").addClass("again").text("Again...").click(function() {
|
|
|
|
window.location.href = window.location.href;
|
|
|
|
}),
|
|
|
|
]);
|
2017-10-08 02:22:41 +00:00
|
|
|
|
2017-10-07 05:05:58 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|