@ -25,13 +25,23 @@ export function filterAnime(arn: AnimeNotifier, input: HTMLInputElement) {
|
||||
arn.diff(`${root.dataset.url}/${year}/${season}/${status}/${type}`)
|
||||
}
|
||||
|
||||
// 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")
|
||||
// Hides anime that are already in your list. And "toggles" localStorage.hide if button is pressed
|
||||
export function hideAddedAnime(arn?: AnimeNotifier, input?: HTMLInputElement) {
|
||||
if (input != undefined && input.type == "submit") {
|
||||
if(localStorage.hide === "true")
|
||||
localStorage.hide = "false"
|
||||
else
|
||||
localStorage.hide = "true"
|
||||
}
|
||||
|
||||
if(localStorage.hide === "true" || input.type === "submit"){
|
||||
for(let anime of findAll("anime-grid-cell")) {
|
||||
if(anime.dataset.added === "true") {
|
||||
anime.classList.toggle("anime-grid-cell-hide")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Hides anime that are not in your list.
|
||||
|
Reference in New Issue
Block a user