initial commit
This commit is contained in:
18
js/index.js
Normal file
18
js/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
(function($) {
|
||||
if (typeof(n3wz) == 'undefined') {
|
||||
var n3wz = {};
|
||||
n3wz.apiPrefix = '/api/';
|
||||
}
|
||||
|
||||
$.when(
|
||||
$.get('templates.ejs'),
|
||||
$.getJSON(n3wz.apiPrefix + 'newsgroup/it.comp.console/threads')
|
||||
)
|
||||
.then(function(templates, threads) {
|
||||
$('body').append(templates[0]);
|
||||
|
||||
$('.js-articles').html(ejs.rtfe('articles', {
|
||||
threads: threads[0].threads
|
||||
}));
|
||||
});
|
||||
})(jQuery);
|
Reference in New Issue
Block a user