Added hide anime in my collection button

This commit is contained in:
2017-12-02 21:06:15 +01:00
parent 0c61456e4e
commit e9f15eacbc
6 changed files with 29 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import { AnimeNotifier } from "../AnimeNotifier"
import { findAll } from "scripts/Utils";
// Filter anime on explore page
export function filterAnime(arn: AnimeNotifier, input: HTMLInputElement) {
@ -7,4 +8,13 @@ export function filterAnime(arn: AnimeNotifier, input: HTMLInputElement) {
let type = arn.app.find("filter-type") as HTMLSelectElement
arn.app.load(`/explore/anime/${year.value}/${status.value}/${type.value}`)
}
// Hides anime that are already in your list.
export function hideAddedAnime() {
for(let anime of findAll("anime-grid-cell")) {
if(anime.dataset.added === "true") {
anime.classList.toggle("anime-grid-cell-hide")
}
}
}