Fixed add_favorites to append to the correct element

Issue #346
https://github.com/ctrlcctrlv/infinity/issues/346#issuecomment-71119100
This commit is contained in:
bbielsa 2015-01-31 10:36:02 -05:00
parent 546e49f560
commit 3a01469dc1

View File

@ -41,15 +41,15 @@ function handle_boards(data) {
return $('<span class="favorite-boards"></span>').append(' [ '+boards.join(" / ")+' ] '); return $('<span class="favorite-boards"></span>').append(' [ '+boards.join(" / ")+' ] ');
} else { } else {
return $('<span class="favorite-boards"></span>'); return $('<span class="favorite-boards"></span>');
} }
} }
function add_favorites() { function add_favorites() {
$('.favorite-boards').remove(); $('.favorite-boards').empty();
var boards = handle_boards(localStorage.favorites); var boards = handle_boards(localStorage.favorites);
$('.boardlist').append(boards); $('.favorite-boards').append(boards);
}; };
if (active_page == 'thread' || active_page == 'index' || active_page == 'catalog') { if (active_page == 'thread' || active_page == 'index' || active_page == 'catalog') {