1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-01 18:47:20 +01:00
vichan/js/update_boards.js
2014-10-06 18:01:01 -07:00

21 lines
393 B
JavaScript

$(document).ready(function(){
window.boards = new Array();
function handle_boards(data) {
$.each(data, function(k, v) {
if (v.uri != 'meta' && v.uri != 'b' && v.uri != 'int') {
boards.push('<a href="/'+v.uri+'">'+v.uri+'</a>');
}
})
if (boards[0]) {
$('.favorite-boards').before(' [ '+boards.slice(0,15).join(" / ")+' ] ');
}
}
$.getJSON("/boards.json", handle_boards)
});