- Made configs work! configs: - debug - logging - logfile - ipget_endpoint_set - ipget_endpoint_get - site_name - search_enable - post_ranking_auto - index_post_sort - comment_sync_on_write - comment_auto_sync - logging framework! loglevels: - -1 - none - 0 - basic - 10 - datahorder - 1337 - haxxer now just logging commands!
22 lines
785 B
JavaScript
22 lines
785 B
JavaScript
// index.js used for /index.html
|
|
console.log(
|
|
` // ------------------------------------------ //
|
|
// Author: derzombiiie (derz@elidragon.com) //
|
|
// License: GPLv3 (if not noted otherwise) //
|
|
// ------------------------------------------ //`)
|
|
|
|
// get newest 10 blog articles from api
|
|
$.get(`/posts?api&${conf.index_post_sort}&len=10`, json => {
|
|
displayshare()
|
|
if ( json.type != "s" )
|
|
return false
|
|
else {
|
|
elements = []
|
|
for( let i = 0 ; i < json.content.length ; i++ ) {
|
|
let elem = new entry(json.content[i].title, json.content[i].author, json.content[i].desc, json.content[i].href, json.content[i].tags, json.content[i].id)
|
|
elements.push(elem)
|
|
$(".content").append(elem.createelement())
|
|
}
|
|
}
|
|
})
|