Better names
This commit is contained in:
parent
d1ac2f1d9b
commit
b264d7b28c
@ -28,14 +28,14 @@ export function filterAnime(arn: AnimeNotifier, input: HTMLInputElement) {
|
|||||||
// Hides anime that are already in your list. And "toggles" localStorage.hide if button is pressed
|
// Hides anime that are already in your list. And "toggles" localStorage.hide if button is pressed
|
||||||
export function hideAddedAnime(arn?: AnimeNotifier, input?: HTMLButtonElement) {
|
export function hideAddedAnime(arn?: AnimeNotifier, input?: HTMLButtonElement) {
|
||||||
if(input) {
|
if(input) {
|
||||||
if(localStorage.getItem("hideAdded") === "true") {
|
if(localStorage.getItem("hide-added-anime") === "true") {
|
||||||
localStorage.setItem("hideAdded", "false")
|
localStorage.setItem("hide-added-anime", "false")
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem("hideAdded", "true")
|
localStorage.setItem("hide-added-anime", "true")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(localStorage.getItem("hideAdded") === "true" || input.type === "submit") {
|
if(input || localStorage.getItem("hide-added-anime") === "true") {
|
||||||
for(let anime of findAll("anime-grid-cell")) {
|
for(let anime of findAll("anime-grid-cell")) {
|
||||||
if(anime.dataset.added === "true") {
|
if(anime.dataset.added === "true") {
|
||||||
anime.classList.toggle("anime-grid-cell-hide")
|
anime.classList.toggle("anime-grid-cell-hide")
|
||||||
|
@ -480,7 +480,7 @@ export default class AnimeNotifier {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(localStorage.getItem("hideAdded") === "true") {
|
if(localStorage.getItem("hide-added-anime") === "true") {
|
||||||
actions.hideAddedAnime()
|
actions.hideAddedAnime()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user