1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-20 20:51:50 +01:00

Top bar blacklist

This commit is contained in:
8chan 2014-10-28 23:22:13 -07:00
parent 75a561a81f
commit 1db3bbe201
2 changed files with 11 additions and 1 deletions

View File

@ -94,7 +94,17 @@ if ($admin) {
echo $html;
} else {
file_write("boards.json", json_encode($boards));
foreach ($boards as $i => $b) {
if (in_array($b['uri'], $config['no_top_bar_boards'])) {
unset($boards[$i]);
}
unset($boards[$i]['img']);
}
array_splice($boards, 20);
$boards = array_values($boards);
file_write("boards-top20.json", json_encode($boards));
file_write("boards.html", $html);
echo 'Done';

View File

@ -3,7 +3,7 @@ $(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') {
if (v.uri != 'meta' && v.uri != 'b') {
boards.push('<a href="/'+v.uri+(window.active_page === 'catalog' ? '/catalog.html' : '')+'">'+v.uri+'</a>');
}
})