<!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;
}
#surrogate-area {
    height:300px;
}
/* hide close button */
.contented-close {
    display: none;
}
		</style>
	</head>
	<body>
        <div id="surrogate-area">
            Loading...
        </div>
        
        <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";

// Handle errors
window.addEventListener('error', function(message) {
    alert(message);
    window.location.href = window.location.href;
})

// Set page title
$.get("/about", function(ret) {
    $("title").text(ret.AppTitle);
});

// Load upload widget
contented.init("#surrogate-area", function(items) {
    
    var $table = $("<table>");
    for (var i = 0; i < items.length; ++i) {
        $table.append($("<tr>").append([
            $("<td>").text(items[i]),
            $("<td>").html("<a target='_blank' href='/get/" + items[i] + "'>get</a>"),
            $("<td>").html("<a target='_blank' href='/info/" + items[i] + "'>info</a>")
        ]))
    }
    $("#surrogate-area").html($table);

});
		</script>
	</body>
</html>