Added hide anime in my collection button
This commit is contained in:
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user