wolegca.github.io/js/view.js
2019-09-20 22:34:39 +08:00

23 lines
495 B
JavaScript

(function () {
var index = getQueryString('i');
$.ajax({
type: "GET",
url: "content.json?timestamp=" + (new Date()).valueOf(),
dataType: "json",
success: function (response) {
listContent(response, index);
if (response[index]['hasCode'])
loadScript('content/js/' + response[index]['date'] + '.js');
$.ajax({
type: "GET",
url: 'content/html/' + response[index]['date'] + '.html',
success: function (res) {
appendContent(res);
}
});
}
});
})();