wolegca.github.io/js/view.js

23 lines
495 B
JavaScript
Raw Normal View History

2019-09-20 13:32:44 +08:00
(function () {
var index = getQueryString('i');
$.ajax({
type: "GET",
2019-09-20 22:34:39 +08:00
url: "content.json?timestamp=" + (new Date()).valueOf(),
2019-09-20 13:32:44 +08:00
dataType: "json",
success: function (response) {
2019-09-20 22:34:39 +08:00
listContent(response, index);
2019-09-20 13:32:44 +08:00
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);
}
});
}
});
})();