idk all of it though lol + made search function disablable + disableing of it disables "search" command / "/search" handler (NOT posts.search() func) + fixed enubar styling in firefox + added "FE!" force exit commend to console.js + made "exit" cmd behave like "stop" - some other stuff i forgot cuz i got distracted --- this is done ~90% safe about that, lol
24 lines
919 B
JavaScript
24 lines
919 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&page=${index}`, json => {
|
|
displayshare()
|
|
if ( json.type != "s" )
|
|
return alert( json.text )
|
|
else {
|
|
rawelements = json
|
|
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, json.content[i].rating)
|
|
elements.push(elem)
|
|
$(".content").append(elem.createelement())
|
|
}
|
|
$(".content").append( pager( json.pages, index ) )
|
|
}
|
|
})
|